Important: Please read the Qt Code of Conduct -

Wrong modifier key (GroupSwitchModifier) after upgrade to 6.1.2

  • I'm using PyQt6 on Linux with Xorg. I have the following example program:

    import sys
    from PyQt6 import QtCore, QtWidgets
    class MainWindow(QtWidgets.QMainWindow):
        def __init__(self, app):
        def mousePressEvent(self, event):
            return super().mousePressEvent(event)
    app = QtWidgets.QApplication(sys.argv)
    win = MainWindow(app)

    With the 6.1.1. installation (PyQt6==6.1.1, PyQt6-Qt6==6.1.1) I get the expected results when clicking, for example:


    After upgrade to the latest versions, I get this instead for the same mouse/key presses:


    Anyone knows what's up with that? Aso, upon inspecting this, I noticed that an upgrade to current yields these version numbers: PyQt6==6.1.1, PyQt6-Qt6==6.1.2, wich are indeed the latest releases on Pypi for these packages.

    Trying to pin the PyQt6 version still always pulls the latest PyQt6-Qt6 package, for example:

    > pip install PyQt6==6.1.0

    So I have to pin PyQt6-Qt6 as well to get a specific version.. It would have assumed that these two packages have the same release cycle and that installing PyQt6 always pulls the matching version?

  • As far as I understand, GroupSwitchModifier is not supposed to be there, right? So I should report a bug? Not quite sure about the Python packages though, whether that's a bug too and maybe the cause of things being weird...

  • Lifetime Qt Champion

    Hi and welcome to devnet,

    That indeed looks strange.

    You should check the bug report system to see if there's already something there and if not, please open a ticket.

  • Thanks for the reply, it's reported now.

  • Lifetime Qt Champion

    Thanks !

    Can you share the ticket link ?
    It will make it easier to find.

Log in to reply