Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.7.0
-
None
Description
Implementing an `eventFilter` in some widget, I am using syntax such as:{}
class SomeWidget(QtWidgets.QWidget): def eventFilter(self, source: QtCore.QObject, event: QtCore.QEvent) -> bool: if event.type() == QtCore.QEvent.KeyPress: if event.matches(QtGui.QKeySequence.Copy): self.copy_selection() return True if event.matches(QtGui.QKeySequence.Paste): self.paste_selection() return True return super().eventFilter(source, event)
But this fails with latest 6.7.0 (while it was working with past releases):
AttributeError: 'PySide6.QtGui.QInputEvent' object has no attribute 'matches'
Note it is also missing method 'key', so even the alternate syntax would not work:
event.key() == QtGui.QKeySequence.Copy
Attachments
Issue Links
- duplicates
-
PYSIDE-2675 Reg 6.6->6.7: Unable to get the QFileOpenEvent from a QEvent
- Closed