<?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[Problem with getting a keyPressEvent for arrow keys]]></title><description><![CDATA[<p dir="auto">I have an application with a QGraphicsView. When I use the arrow keys, things scroll as I expect.</p>
<p dir="auto">I also have a QObject on the screen. When I hover over the QObject, I pop up a QDialog.</p>
<p dir="auto">While the QDialog is displayed, the arrow keys no longer work. The other keys (letter and number keys) still work fine. Neither the keyPressEvent method or the main event method are called for the arrow keys, but they are both called for letter keys.</p>
<p dir="auto">I've tried overriding the keyPressEvent and the event methods for every class I can think of, for the QObject, for the QDialog, for QGraphicsView, for QGraphicsScene, and none of those get called for arrow keys when that hover dialog is up, but the right ones are called when I press a letter key.</p>
<p dir="auto">I even set the focus policy to strong focus as some online have suggested. It didn't change the behavior.</p>
<p dir="auto">I think I've run out of things to try. Anyone have any suggestions?</p>
<p dir="auto">Windows 11. Qt 5.15</p>
]]></description><link>https://forum.qt.io/topic/163554/problem-with-getting-a-keypressevent-for-arrow-keys</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 18:27:42 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/163554.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Oct 2025 16:44:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with getting a keyPressEvent for arrow keys on Thu, 23 Oct 2025 18:50:33 GMT]]></title><description><![CDATA[<p dir="auto">Are you using a custom Qt build ?<br />
One thing you can do is check the <a href="https://doc.qt.io/archives/qt-5.15/qloggingcategory.html" target="_blank" rel="noopener noreferrer nofollow ugc">Qt Logging Category</a>.<br />
There are multiple used in Qt's own code.</p>
]]></description><link>https://forum.qt.io/post/833082</link><guid isPermaLink="true">https://forum.qt.io/post/833082</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Thu, 23 Oct 2025 18:50:33 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with getting a keyPressEvent for arrow keys on Thu, 23 Oct 2025 17:41:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/sgaist">@<bdi>SGaist</bdi></a> I would do that if I thought it was possible.</p>
<p dir="auto">A debugging Qt would help, but we aren't set up for that here.</p>
<p dir="auto">Does Qt have any internal logging that could be turned on in a release build that might help? I'd love to see who is swallowing the arrow keys.</p>
]]></description><link>https://forum.qt.io/post/833076</link><guid isPermaLink="true">https://forum.qt.io/post/833076</guid><dc:creator><![CDATA[james b-s]]></dc:creator><pubDate>Thu, 23 Oct 2025 17:41:51 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with getting a keyPressEvent for arrow keys on Mon, 20 Oct 2025 22:05:14 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">The best thing to do would be to create a minimal compilable reproducer so that people can check what might be going on.</p>
]]></description><link>https://forum.qt.io/post/833000</link><guid isPermaLink="true">https://forum.qt.io/post/833000</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Mon, 20 Oct 2025 22:05:14 GMT</pubDate></item></channel></rss>