Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Qt 6
  4. Wrong modifier key (GroupSwitchModifier) after upgrade to 6.1.2
Forum Updated to NodeBB v4.3 + New Features

Wrong modifier key (GroupSwitchModifier) after upgrade to 6.1.2

Scheduled Pinned Locked Moved Unsolved Qt 6
6 Posts 2 Posters 1.2k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    le_becc
    wrote on last edited by
    #1

    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):
            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:

    KeyboardModifier.GroupSwitchModifier
    KeyboardModifier.GroupSwitchModifier|ControlModifier
    KeyboardModifier.GroupSwitchModifier|AltModifier
    KeyboardModifier.GroupSwitchModifier|ShiftModifier
    

    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
    ...
    PyQt6==6.1.0
    PyQt6-Qt6==6.1.2
    

    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?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      le_becc
      wrote on last edited by
      #2

      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...

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        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.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • L Offline
          L Offline
          le_becc
          wrote on last edited by
          #4

          Thanks for the reply, it's reported now.

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Thanks !

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

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply
            0
            • L Offline
              L Offline
              le_becc
              wrote on last edited by
              #6

              Sure!

              https://bugreports.qt.io/browse/QTBUG-95289

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved