<?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[Shortcut how handle permanent key press action]]></title><description><![CDATA[<p dir="auto">I would like to use a shortcut on a PushButton ... PushButton is linked to a pressed action and released action function .... I make a shortcut with the F10 key .... but I would like the PushButto to remain in pressed state as long as the F10 key is pressed .... now if I hold down F10 I get a series of PushButton pressed and released actions ....</p>
<p dir="auto">Override keypressEvent and keyReleaseEvent not help .....</p>
<p dir="auto">thanks a lot for any cuggest</p>
]]></description><link>https://forum.qt.io/topic/134942/shortcut-how-handle-permanent-key-press-action</link><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 19:29:34 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/134942.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 09 Mar 2022 18:42:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Shortcut how handle permanent key press action on Thu, 10 Mar 2022 00:36:25 GMT]]></title><description><![CDATA[<p dir="auto">I like software layering...an alternate approach that I would use would be to create a custom pushbutton that provides the behavior.  pushbuttons have an abstract base interface.  Start there or look at subclassing QPushbutton.</p>
]]></description><link>https://forum.qt.io/post/705842</link><guid isPermaLink="true">https://forum.qt.io/post/705842</guid><dc:creator><![CDATA[Kent-Dorfman]]></dc:creator><pubDate>Thu, 10 Mar 2022 00:36:25 GMT</pubDate></item><item><title><![CDATA[Reply to Shortcut how handle permanent key press action on Wed, 09 Mar 2022 19:04:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gfxx">@<bdi>gfxx</bdi></a> said in <a href="/post/705823">Shortcut how handle permanent key press action</a>:</p>
<blockquote>
<p dir="auto">Override keypressEvent and keyReleaseEvent not help .....</p>
</blockquote>
<p dir="auto">But that's the only way...<br />
<code>QShortcut</code> cant differentiate between press and release...</p>
<p dir="auto">Override press- and releaseEvent and keep your button in pressed/down state, until you get a <code>F10</code>-keyReleaseEvent.</p>
]]></description><link>https://forum.qt.io/post/705826</link><guid isPermaLink="true">https://forum.qt.io/post/705826</guid><dc:creator><![CDATA[Pl45m4]]></dc:creator><pubDate>Wed, 09 Mar 2022 19:04:40 GMT</pubDate></item></channel></rss>