nucleic / enaml

Declarative User Interfaces for Python
http://enaml.readthedocs.io/en/latest/
Other
1.53k stars 130 forks source link

DockArea does not appear to like floating point values anymore #472

Closed ghost closed 2 years ago

ghost commented 2 years ago

I get this error message when attempting to drag a DockItem:

Traceback (most recent call last):
  File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\q_dock_frame.py", line 226, in mouseMoveEvent
    if self.titleBarMouseMoveEvent(event):
  File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\q_dock_container.py", line 736, in titleBarMouseMoveEvent
    self.manager().drag_move_frame(self, target_pos, global_pos)
  File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\dock_manager.py", line 464, in drag_move_frame
    self._update_drag_overlay(frame, mouse_pos)
  File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\dock_manager.py", line 627, in _update_drag_overlay
    overlay.mouse_over_area(target, widget, local)
  File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\dock_overlay.py", line 521, in mouse_over_area
    band_geo = self._band_geometry(widget, guide)
  File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\dock_overlay.py", line 323, in _band_geometry
    rect.setHeight(rect.height() / 3)
TypeError: setHeight(self, int): argument 1 has unexpected type 'float'

This is on Windows 10. Installed Qt versions are:

PyQt5==5.15.6
PyQt5-Qt5==5.15.2
PyQt5-sip==12.9.0
QtPy==2.0.0
sccolbert commented 2 years ago

That looks like a Python 2 relic, where that would have been integer division.

But I guess PyQt had been coercing that for us up until now.

On Fri, Jan 14, 2022 at 5:58 PM buranconsult @.***> wrote:

I get this error message when attempting to drag a DockItem:

Traceback (most recent call last): File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\q_dock_frame.py", line 226, in mouseMoveEvent if self.titleBarMouseMoveEvent(event): File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\q_dock_container.py", line 736, in titleBarMouseMoveEvent self.manager().drag_move_frame(self, target_pos, global_pos) File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\dock_manager.py", line 464, in drag_move_frame self._update_drag_overlay(frame, mouse_pos) File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\dock_manager.py", line 627, in _update_drag_overlay overlay.mouse_over_area(target, widget, local) File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\dock_overlay.py", line 521, in mouse_over_area band_geo = self._band_geometry(widget, guide) File "c:\users\bburan\projects\consulting\ncrar\biosemi\src\enaml\enaml\qt\docking\dock_overlay.py", line 323, in _band_geometry rect.setHeight(rect.height() / 3) TypeError: setHeight(self, int): argument 1 has unexpected type 'float'

This is on Windows 10. Installed Qt versions are:

PyQt5==5.15.6 PyQt5-Qt5==5.15.2 PyQt5-sip==12.9.0 QtPy==2.0.0

— Reply to this email directly, view it on GitHub https://github.com/nucleic/enaml/issues/472, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABBQSLV2MP7CF3ZVSIVUATUWC2CTANCNFSM5MADIAIQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.***>