<?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[Using spacebar as a shortcut]]></title><description><![CDATA[<p dir="auto">In my application I'd like to use the spacebar as a shortcut/hot key, similar to how iTunes uses the spacebar: starting or stopping a song, or some action in my case.</p>
<p dir="auto">I haven't starting digging into this, but because my application has text areas, it seems like I'd have to keep track of whether any of the text area widgets have focus, and disable the spacebar shortcut if that's the case.</p>
<p dir="auto">Am I on the right track here?</p>
]]></description><link>https://forum.qt.io/topic/13815/using-spacebar-as-a-shortcut</link><generator>RSS for Node</generator><lastBuildDate>Sat, 25 Apr 2026 13:21:03 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/13815.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 07 Feb 2012 06:58:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Using spacebar as a shortcut on Thu, 09 Feb 2012 11:59:36 GMT]]></title><description><![CDATA[<p dir="auto">Setting a &lsqb;&lsqb;Doc:QShortcut&rsqb;&rsqb; on the application and/or main window should work too.</p>
]]></description><link>https://forum.qt.io/post/128528</link><guid isPermaLink="true">https://forum.qt.io/post/128528</guid><dc:creator><![CDATA[goetz]]></dc:creator><pubDate>Thu, 09 Feb 2012 11:59:36 GMT</pubDate></item><item><title><![CDATA[Reply to Using spacebar as a shortcut on Wed, 08 Feb 2012 05:22:07 GMT]]></title><description><![CDATA[<p dir="auto">eventFilter and installEventFilter look like they should do the job...thanks for the tip!</p>
]]></description><link>https://forum.qt.io/post/128357</link><guid isPermaLink="true">https://forum.qt.io/post/128357</guid><dc:creator><![CDATA[brianz]]></dc:creator><pubDate>Wed, 08 Feb 2012 05:22:07 GMT</pubDate></item><item><title><![CDATA[Reply to Using spacebar as a shortcut on Tue, 07 Feb 2012 08:58:35 GMT]]></title><description><![CDATA[<p dir="auto">You can try to reimplement "event()":<a href="http://developer.qt.nokia.com/doc/qt-4.8/qobject.html#event" target="_blank" rel="noopener noreferrer nofollow ugc">http://developer.qt.nokia.com/doc/qt-4.8/qobject.html#event</a> function of your application or, if it doesn't help, create a class with "eventFilter()":<a href="http://developer.qt.nokia.com/doc/qt-4.8/qobject.html#eventFilter" target="_blank" rel="noopener noreferrer nofollow ugc">http://developer.qt.nokia.com/doc/qt-4.8/qobject.html#eventFilter</a> implemented and call "installEventFilter()":<a href="http://developer.qt.nokia.com/doc/qt-4.8/qobject.html#installEventFilter" target="_blank" rel="noopener noreferrer nofollow ugc">http://developer.qt.nokia.com/doc/qt-4.8/qobject.html#installEventFilter</a> for every widget that uses spacebar.</p>
]]></description><link>https://forum.qt.io/post/128254</link><guid isPermaLink="true">https://forum.qt.io/post/128254</guid><dc:creator><![CDATA[p-himik]]></dc:creator><pubDate>Tue, 07 Feb 2012 08:58:35 GMT</pubDate></item></channel></rss>