<?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[Strange mouse behavior]]></title><description><![CDATA[<p dir="auto">I have a class derived from QWidget which has mousePressEvent, mouseMoveEvent, and mouseReleaseEvent overridden. I have two instances of this derived class in my application.</p>
<p dir="auto">One works exactly how I'd expect, mousePressEvent when the mouse button is pressed, mouseMoveEvent whenever it moves (mouse button down or not), and mouseReleaseEvent when the mouse button is released.</p>
<p dir="auto">The other doesn't. mousePressEvent fires normally but then mouseMoveEvent won't fire at all. mouseMoveEvent will only start firing once the mouse button is released, which also does not fire a mouseReleaseEvent. At that point, my application thinks it's dragging even though the mouse button isn't being held down. Only with another click will another mousePressEvent and finally a mouseReleaseEvent get triggered.</p>
<p dir="auto">I have no idea what's causing this, and as far as I know both instances are completely identical so there's no reason it would be happening.</p>
<p dir="auto">This is Qt 5.10.1 on MSVC 2015. Any help would be greatly appreciated!</p>
]]></description><link>https://forum.qt.io/topic/95469/strange-mouse-behavior</link><generator>RSS for Node</generator><lastBuildDate>Thu, 07 May 2026 13:58:56 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/95469.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 11 Oct 2018 04:36:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Strange mouse behavior on Thu, 11 Oct 2018 12:37:48 GMT]]></title><description><![CDATA[<p dir="auto">Hi, thanks for your response. I managed to solve this after some closer inspection. I wasn't calling the base class implementations, but through a few functions happened to be calling resize and update functions on said QWidget which would eventually loop and cause a stack overflow. After adjusting the offending code, the mouse functions work as expected.</p>
]]></description><link>https://forum.qt.io/post/486385</link><guid isPermaLink="true">https://forum.qt.io/post/486385</guid><dc:creator><![CDATA[thsprppr]]></dc:creator><pubDate>Thu, 11 Oct 2018 12:37:48 GMT</pubDate></item><item><title><![CDATA[Reply to Strange mouse behavior on Thu, 11 Oct 2018 06:33:59 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/thsprppr">@<bdi>thsprppr</bdi></a><br />
my first guess: you didn't call the base class implementation when overriding the mouse event handlers?<br />
Also it would help if you show the code of your mouse event handlers.</p>
]]></description><link>https://forum.qt.io/post/486311</link><guid isPermaLink="true">https://forum.qt.io/post/486311</guid><dc:creator><![CDATA[raven-worx]]></dc:creator><pubDate>Thu, 11 Oct 2018 06:33:59 GMT</pubDate></item></channel></rss>