<?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[[SOLVED] keyPressEvent Qt_Key doesn&#x27;t work]]></title><description><![CDATA[<p dir="auto">I have the keyPressEvent method and inside I have something like that:</p>
<p dir="auto">@if (event-&gt;key() == Qt::Key_Up)  {<br />
qDebug() &lt;&lt; "up key";<br />
} else if (event-&gt;modifiers().testFlag(Qt::AltModifier) &amp;&amp; event-&gt;key() == Qt::Key_Enter)  {<br />
qDebug() &lt;&lt; "ctrl+enter"<br />
}@</p>
<p dir="auto">But doesn't work. Other keys works normally, but keys like Ctrl, Alt, Shift, Enter, and so on, doesn't.</p>
<p dir="auto">Enter key works only when I put 16777220 instead of Qt_Key_Enter</p>
]]></description><link>https://forum.qt.io/topic/47324/solved-keypressevent-qt_key-doesn-t-work</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 09:23:55 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/47324.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 22 Oct 2014 12:29:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [SOLVED] keyPressEvent Qt_Key doesn&#x27;t work on Wed, 22 Oct 2014 23:00:11 GMT]]></title><description><![CDATA[<p dir="auto">You're welcome !</p>
<p dir="auto">Since your keys are working now, please update the thread title prepending [solved] so other forum users may know solution has been found :)</p>
]]></description><link>https://forum.qt.io/post/248704</link><guid isPermaLink="true">https://forum.qt.io/post/248704</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 22 Oct 2014 23:00:11 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] keyPressEvent Qt_Key doesn&#x27;t work on Wed, 22 Oct 2014 13:06:54 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, it's working.</p>
]]></description><link>https://forum.qt.io/post/248644</link><guid isPermaLink="true">https://forum.qt.io/post/248644</guid><dc:creator><![CDATA[[[global:former-user]]]]></dc:creator><pubDate>Wed, 22 Oct 2014 13:06:54 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] keyPressEvent Qt_Key doesn&#x27;t work on Wed, 22 Oct 2014 12:39:26 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Are you sure it's not Qt::Key_Return that you want to use ? AFAIK, Key_Enter is for the keypad "Return"</p>
]]></description><link>https://forum.qt.io/post/248635</link><guid isPermaLink="true">https://forum.qt.io/post/248635</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 22 Oct 2014 12:39:26 GMT</pubDate></item></channel></rss>