Skip to content

Commit 4f34f0c

Browse files
Fix QWheelEvent source attribute error in DraggableImageListWidget
In PyQt6, QWheelEvent no longer has a `source()` method. When creating a new QWheelEvent, `device=event.device()` must be passed instead. This commit updates the `wheelEvent` handler in `DraggableImageListWidget` to properly instantiate the updated event structure without causing an AttributeError. Co-authored-by: kangjoseph90 <83045825+kangjoseph90@users.noreply.github.com>
1 parent 682a160 commit 4f34f0c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ui/file_list_widget.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def wheelEvent(self, event):
9898
event.modifiers(),
9999
event.phase(),
100100
event.inverted(),
101-
event.source()
101+
device=event.device()
102102
)
103103
super().wheelEvent(new_event)
104104

0 commit comments

Comments
 (0)