Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QAction keyboard shortcut failure after menu use – application focus issue? Qt 5.1 / Win7 / Mingw64

QAction keyboard shortcut failure after menu use – application focus issue? Qt 5.1 / Win7 / Mingw64

Scheduled Pinned Locked Moved General and Desktop
3 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.
  • M Offline
    M Offline
    marksutton
    wrote on last edited by
    #1

    I’ve run into something that has me completely stumped, and am desperately hoping that someone can help me out.

    I’ve got an OpenGL renderer application that used to run fine under Qt4.8 – I’m now porting it to 5.1, and have a persistent problem with keyboard shortcuts. My application uses QActions with keyboard shortcuts, some defined in the ui file, others created in code. All are application-level shortcuts. They worked under Qt4.8. I find now that when I use the menus (specifically when I close them) the shortcuts stop working. They start again if I interact with the program using the mouse, e.g. click into a widget. They also start again if I change focus to another application (e.g. by alt-tabbing), then change back. Using a timer to force focus into a particular widget does not solve the problem. Clicking in the status bar of the mainwindow also seems to stop the actions working.

    I’ve tried intercepting the keyboard events at various places, but nothing has worked – they simply don’t seem to be visible to anything once this problem kicks in. The only idea I have is that the application is somehow losing focus, although visually Windows does not seem to indicate that this is the case.

    Any ideas anyone? I’m running out of even ugly kludgey ideas for trying to fix this or get any further with it…

    Thanks in advance

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

      Hi,

      Since this looks like a regression, you might better ask on the mailing list, you'll find Qt maintainers/developers there. This forum is more user oriented.

      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
      • M Offline
        M Offline
        marksutton
        wrote on last edited by
        #3

        OK, thanks, probably good advice - I'm not absolutely sure that this is Qt's fault rather than mine, but it's certainly possible. Ignorant question though - what mailing list exactly, and how do I join/post to it?

        Ta

        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