<?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[MousePressEvent - space pressed&#x2F;hold&#x2F;check?]]></title><description><![CDATA[<p dir="auto">Hey</p>
<p dir="auto">I'm in mousePressEvent. I can get button/s () to determine what mouse button got pressed and I can use QGuiApplication::keyboardModifiers(); to get what modifier got pressed, but how can I check if space was pressed? I mean I want to know if some one is holding space while pressing mouse button.</p>
]]></description><link>https://forum.qt.io/topic/91404/mousepressevent-space-pressed-hold-check</link><generator>RSS for Node</generator><lastBuildDate>Thu, 29 Oct 2026 05:09:17 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/91404.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 06 Jun 2018 14:24:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to MousePressEvent - space pressed&#x2F;hold&#x2F;check? on Thu, 07 Jun 2018 10:00:48 GMT]]></title><description><![CDATA[<p dir="auto">Hey</p>
<p dir="auto">Ended up installing custom event filter which had event filter that emmited a signal when it was pressed/released. Had to do it this wa as I had to install event filter on both graphicsView and Viewport()</p>
<p dir="auto">For any1 interested, the installed class was a QObject with eventFIlter replaced with my signal that send info out when key was pressed. This way if I have mouse move event in action and I press/release key I get proper updates on the go.</p>
]]></description><link>https://forum.qt.io/post/462428</link><guid isPermaLink="true">https://forum.qt.io/post/462428</guid><dc:creator><![CDATA[Dariusz]]></dc:creator><pubDate>Thu, 07 Jun 2018 10:00:48 GMT</pubDate></item><item><title><![CDATA[Reply to MousePressEvent - space pressed&#x2F;hold&#x2F;check? on Wed, 06 Jun 2018 20:04:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/dariusz">@<bdi>Dariusz</bdi></a><br />
Since there does not appear to be a Qt function to tell you if a (non-modifier) key is being pressed, you can use the generic key pressed &amp; released events to track the spacebar down/up for yourself, and use the result in your mouse press event.</p>
]]></description><link>https://forum.qt.io/post/462323</link><guid isPermaLink="true">https://forum.qt.io/post/462323</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Wed, 06 Jun 2018 20:04:51 GMT</pubDate></item></channel></rss>