<?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[How set mouse scrolling as a shortcut]]></title><description><![CDATA[<p dir="auto">I have a Qt application and I want to set mouse wheel as a shortcut.</p>
<p dir="auto">Now when I turn off possibility of use shortcuts I can't use keys but still the mouse wheel works. How can I block mouse wheel when I turn off possibility of use shortcuts?</p>
]]></description><link>https://forum.qt.io/topic/140554/how-set-mouse-scrolling-as-a-shortcut</link><generator>RSS for Node</generator><lastBuildDate>Mon, 23 Nov 2026 00:12:14 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/140554.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 07 Nov 2022 08:48:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How set mouse scrolling as a shortcut on Mon, 07 Nov 2022 08:52:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mary02">@<bdi>Mary02</bdi></a> You can implement an event filter, see <a href="https://doc.qt.io/qt-5/eventsandfilters.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/eventsandfilters.html</a></p>
]]></description><link>https://forum.qt.io/post/735225</link><guid isPermaLink="true">https://forum.qt.io/post/735225</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 07 Nov 2022 08:52:05 GMT</pubDate></item><item><title><![CDATA[Reply to How set mouse scrolling as a shortcut on Tue, 08 Nov 2022 11:40:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mary02">@<bdi>Mary02</bdi></a> said in <a href="/post/735373">How set mouse scrolling as a shortcut</a>:</p>
<blockquote>
<p dir="auto">How can I add this variable to my eventFilter?</p>
</blockquote>
<p dir="auto">The Qt way is to use signals/slots to communicate the change of the shortcut changes to whatever part of your app needs to know.</p>
]]></description><link>https://forum.qt.io/post/735383</link><guid isPermaLink="true">https://forum.qt.io/post/735383</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Tue, 08 Nov 2022 11:40:31 GMT</pubDate></item><item><title><![CDATA[Reply to How set mouse scrolling as a shortcut on Tue, 08 Nov 2022 10:58:51 GMT]]></title><description><![CDATA[<p dir="auto">Thanks, but I have a problem with it. I add <em>eventFilter</em> in file where is my object:</p>
<pre><code>bool obj::eventFilter(QObject *object, QEvent *event)
{
    if (event-&gt;type() == QEvent::Wheel) {
        return true;
    }

    return QObject::eventFilter(object, event);
}
</code></pre>
<p dir="auto">and now mouse wheel is totally blocked. Bool variable which says if <em>shortcuts</em> are on/off is in different file and it's <em>private</em>. How can I add this variable to my <em>eventFilter</em>?</p>
]]></description><link>https://forum.qt.io/post/735373</link><guid isPermaLink="true">https://forum.qt.io/post/735373</guid><dc:creator><![CDATA[Mary02]]></dc:creator><pubDate>Tue, 08 Nov 2022 10:58:51 GMT</pubDate></item><item><title><![CDATA[Reply to How set mouse scrolling as a shortcut on Mon, 07 Nov 2022 08:52:05 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/mary02">@<bdi>Mary02</bdi></a> You can implement an event filter, see <a href="https://doc.qt.io/qt-5/eventsandfilters.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/eventsandfilters.html</a></p>
]]></description><link>https://forum.qt.io/post/735225</link><guid isPermaLink="true">https://forum.qt.io/post/735225</guid><dc:creator><![CDATA[jsulm]]></dc:creator><pubDate>Mon, 07 Nov 2022 08:52:05 GMT</pubDate></item></channel></rss>