<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[QAction keyboard shortcut failure after menu use – application focus issue? Qt 5.1 &#x2F; Win7 &#x2F; Mingw64]]></title><description><![CDATA[<p dir="auto">I’ve run into something that has me completely stumped, and am desperately hoping that someone can help me out.</p>
<p dir="auto">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.</p>
<p dir="auto">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.</p>
<p dir="auto">Any ideas anyone? I’m running out of even ugly kludgey ideas for trying to fix this or get any further with it…</p>
<p dir="auto">Thanks in advance</p>
]]></description><link>https://forum.qt.io/topic/29687/qaction-keyboard-shortcut-failure-after-menu-use-application-focus-issue-qt-5-1-win7-mingw64</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 19:04:49 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/29687.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 20 Jul 2013 20:53:05 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QAction keyboard shortcut failure after menu use – application focus issue? Qt 5.1 &#x2F; Win7 &#x2F; Mingw64 on Sun, 21 Jul 2013 10:00:39 GMT]]></title><description><![CDATA[<p dir="auto">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?</p>
<p dir="auto">Ta</p>
]]></description><link>https://forum.qt.io/post/187336</link><guid isPermaLink="true">https://forum.qt.io/post/187336</guid><dc:creator><![CDATA[marksutton]]></dc:creator><pubDate>Sun, 21 Jul 2013 10:00:39 GMT</pubDate></item><item><title><![CDATA[Reply to QAction keyboard shortcut failure after menu use – application focus issue? Qt 5.1 &#x2F; Win7 &#x2F; Mingw64 on Sat, 20 Jul 2013 22:23:53 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">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.</p>
]]></description><link>https://forum.qt.io/post/187307</link><guid isPermaLink="true">https://forum.qt.io/post/187307</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Sat, 20 Jul 2013 22:23:53 GMT</pubDate></item></channel></rss>