Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix issue with dragdroptab - convert float coords to int #97

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

chrisjbillington
Copy link
Member

QPoint no longer auto converts float arguments, resulting in an error

This resolves an issue where dragging a tab outside of the main window results in this exception:

Traceback (most recent call last):
  File "/home/bilbo/miniconda3/envs/py311/lib/python3.11/site-packages/labscript_utils/qtwidgets/dragdroptab.py", line 319, in updateCurrentTime
    self.limbo_position = QPoint(new_pos_x, new_pos_y)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: arguments did not match any overloaded call:
  QPoint(): too many arguments
  QPoint(int, int): argument 1 has unexpected type 'float'
  QPoint(QPoint): argument 1 has unexpected type 'float'

QPoint no longer auto converts float arguments, resulting in an error
@dihm dihm merged commit 87de9cd into master Apr 13, 2023
dihm added a commit that referenced this pull request Apr 18, 2023
commit d14cb74
Merge: fb122b3 d07618a
Author: Chris Billington <[email protected]>
Date:   Tue Apr 18 13:14:45 2023 +1000

    Merge pull request #96 from labscript-suite/high-dipi

    Set some Qt settings to play nicer on High DPI displays

commit fb122b3
Merge: 87de9cd 1568793
Author: David Meyer <[email protected]>
Date:   Wed Apr 12 21:19:24 2023 -0400

    Merge pull request #94 from dihm/shot_utils

    Moving `get_shot_globals` function from runmanager to labscript_utils.

commit 87de9cd
Merge: 29ac288 835bbe8
Author: David Meyer <[email protected]>
Date:   Wed Apr 12 20:22:57 2023 -0400

    Merge pull request #97 from labscript-suite/dragdroptab-fix

    Fix issue with dragdroptab - convert float coords to int

commit 29ac288
Author: David Meyer <[email protected]>
Date:   Wed Apr 12 19:45:40 2023 -0400

    Update python version support

commit 5f2775e
Merge: c38b661 90f486d
Author: David Meyer <[email protected]>
Date:   Wed Apr 12 17:10:05 2023 -0400

    Merge pull request #98 from dihm/update-workflow

    Sync workflow

commit 90f486d
Author: David Meyer <[email protected]>
Date:   Wed Apr 12 17:06:41 2023 -0400

    Sync workflow

commit 835bbe8
Author: chrisjbillington <[email protected]>
Date:   Sat Apr 8 21:00:52 2023 +1000

    Fix issue with dragdroptab - convert float coords to int

    QPoint no longer auto converts float arguments, resulting in an error

commit d07618a
Author: chrisjbillington <[email protected]>
Date:   Sat Apr 8 20:37:17 2023 +1000

    Set some Qt settings to play nicer on High DPI displays

    `labscript_utils.splash` is the first place a `QApplication` gets
    created for all of our apps. So setting these settings there applies
    them to all our applications, although they are also needed for the
    splash screen itself to be scaled better on High DPI displays.

    `AA_EnableHighDpiScaling` scales all pixel metrics to the device pixel
    ratio - so this means curved edges and padding and whatnot get scaled
    up, as well as the size of some pixmaps.

    `AA_UseHighDpiPixmaps` means to use high DPI pixmaps for icons etc,
    directly, rather than rendering them at the lower resolution and then
    scaling them up (not sure why anyone would want the latter behaviour).
    Strangely, high resolution pixmaps *are* used when
    `AA_EnableHighDpiScaling` is *off*. It's only when it is turned on that
    they get downscaled and then upscaled again and end up blocky.

commit 1568793
Author: David Meyer <[email protected]>
Date:   Mon Mar 13 10:21:39 2023 -0400

    Moving `get_shot_globals` function from runmanager to labscript_utils.

    This will allow us to break lyse's dependency on runmanager.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants