silx.gui.plot.PlotWidget: Fixed matplotlib backend wheel support - #4686
Merged
Conversation
t20100
commented
Aug 1, 2026
| event.modifiers(), | ||
| event.phase(), | ||
| event.inverted(), | ||
| qt.Qt.MouseEventSynthesizedByApplication, |
Member
Author
There was a problem hiding this comment.
PyQt5 has no pointingDevice argument: https://doc.qt.io/archives/qt-5.15/qwheelevent.html#QWheelEvent-6
| event.modifiers(), | ||
| event.phase(), | ||
| event.inverted(), | ||
| qt.Qt.MouseEventSynthesizedByApplication, |
Member
Author
There was a problem hiding this comment.
event.source() is obsolete in Qt6: https://doc.qt.io/qt-6/qmouseevent-obsolete.html#source, and so not available through PyQt6.
Though it works with PyQt5 and PySide6, I decided to do the same for all bindings (TBH I doubt it is ever retrieved).
| event.buttons(), | ||
| event.modifiers(), | ||
| event.phase(), | ||
| event.isInverted(), |
Member
Author
There was a problem hiding this comment.
Typo here, there is no isInverted, it's inverted https://doc.qt.io/qt-6/qwheelevent.html#inverted-prop
payno
approved these changes
Aug 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
<Module or Topic>: <Action> <Summary>(see contributing guidelines)PR summary
This PR fixes issues with the use of
QWheelEventevent in the matplotlib backend with the different Qt bindings (see comments).To reproduce:
QT_API=PyQt6 ipython->from silx import sx, config; w = sx.plot([1, 2, 3], backend="mpl")and zoom in/out with the trackpad (or need to fall in the specific condition
if event.angleDelta().y() == 0:)Bug introduced in #4631
AI Disclosure