<?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 accepts no letters]]></title><description><![CDATA[<p dir="auto">Hi there</p>
<p dir="auto">I'm using the keyPressEvent in my QMainWindow class like this:</p>
<p dir="auto">@<br />
void MyMainWindow::keyPressEvent(QKeyEvent *keyEvent)<br />
{<br />
qDebug() &lt;&lt; keyEvent-&gt;key();<br />
}<br />
@</p>
<p dir="auto">But it only detects special keys like enter, ctrl, alt etc. but no letters or numbers. Did I oversee something?</p>
<p dir="auto">Edit:</p>
<p dir="auto">Found it. Because my QMainWindow class only posseses QSpinBox items the focus is always on them. Somehow the QMainWindow class catches special keys but letters or numbers go to the QSpinBox.</p>
]]></description><link>https://forum.qt.io/topic/18646/solved-keypressevent-accepts-no-letters</link><generator>RSS for Node</generator><lastBuildDate>Tue, 12 May 2026 06:33:49 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/18646.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 27 Jul 2012 11:44:56 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [SOLVED] keyPressEvent accepts no letters on Mon, 30 Jul 2012 13:00:35 GMT]]></title><description><![CDATA[<p dir="auto">@mods - This is not a Qt Quick problem... Please move it to General and Desktop</p>
]]></description><link>https://forum.qt.io/post/146048</link><guid isPermaLink="true">https://forum.qt.io/post/146048</guid><dc:creator><![CDATA[raaghuu]]></dc:creator><pubDate>Mon, 30 Jul 2012 13:00:35 GMT</pubDate></item><item><title><![CDATA[Reply to [SOLVED] keyPressEvent accepts no letters on Mon, 30 Jul 2012 11:54:48 GMT]]></title><description><![CDATA[<p dir="auto">try it :<br />
@<br />
installEventFilter(this);<br />
@</p>
<p dir="auto">for enable the keypress event filter ;</p>
]]></description><link>https://forum.qt.io/post/146039</link><guid isPermaLink="true">https://forum.qt.io/post/146039</guid><dc:creator><![CDATA[francomartins]]></dc:creator><pubDate>Mon, 30 Jul 2012 11:54:48 GMT</pubDate></item></channel></rss>