Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.1.2
-
None
-
-
bb4b40b7e1b7cc0af2f0c74a991edf39d64cac06 b587e4c0345ae5efe6889f27e112619cd083294b (qt/tqtc-qtbase/6.2.1)
Description
Example code:
import sys from PyQt6 import QtCore, QtWidgets class MainWindow(QtWidgets.QMainWindow): def __init__(self, app): super().__init__() self.show() def mousePressEvent(self, event): print(event.modifiers()) return super().mousePressEvent(event) app = QtWidgets.QApplication(sys.argv) win = MainWindow(app) app.exec()
With the 6.1.1. installation (PyQt6==6.1.1, PyQt6-Qt6==6.1.1) I get the expected results when clicking, for example:
KeyboardModifier.NoModifier KeyboardModifier.ControlModifier KeyboardModifier.AltModifier KeyboardModifier.ShiftModifier
After upgrade to the latest versions, I get this instead for the same mouse/key presses (on Linux with Xorg and also Wayland):
KeyboardModifier.GroupSwitchModifier KeyboardModifier.GroupSwitchModifier|ControlModifier KeyboardModifier.GroupSwitchModifier|AltModifier KeyboardModifier.GroupSwitchModifier|ShiftModifier
The same seems to have been reported here for Qt5 but I wasn't sure whether I should re-open that ticket: QTBUG-95108. That tickets links the bug to QTBUG-49771.
Also, upon inspecting this, I noticed that an upgrade to current yields these version numbers: PyQt6==6.1.1, PyQt6-Qt6==6.1.2, which are indeed the latest releases on Pypi for these packages. Pinning PyQt6 to any version always pulls the latest PyQt6-Qt6 and I have to pin it separately. That seems weird to me, but I'm not sure if that's a bug and should be reported as such.
Attachments
Issue Links
- relates to
-
QTBUG-95108 Reg[Qt 5.15.4->Qt5.15.5] Qt::MetaModifier and Qt::GroupSwitchModifier is always set
- Closed
- resulted from
-
QTBUG-49771 Backspace key is not working when CapsLock is on
- Open
-
QTBUG-36565 Some key symbols generated by xkb level 3 shift don't work in QTextBrowser, QTextEdit, QLineEdit
- Closed
For Gerrit Dashboard: QTBUG-95289 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
371421,3 | Revert "Qt xcb: remove false detects of Qt::GroupSwitchModifier" | dev | qt/qtbase | Status: MERGED | +2 | 0 |
371486,2 | Revert "Qt xcb: remove false detects of Qt::GroupSwitchModifier" | 6.2 | qt/qtbase | Status: MERGED | +2 | 0 |
371527,2 | Revert "Qt xcb: remove false detects of Qt::GroupSwitchModifier" | 6.2.0 | qt/qtbase | Status: MERGED | +2 | 0 |
371535,2 | Revert "Qt xcb: remove false detects of Qt::GroupSwitchModifier" | tqtc/lts-5.15 | qt/tqtc-qtbase | Status: MERGED | +2 | 0 |