<?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[Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck]]></title><description><![CDATA[<p dir="auto"><strong>Title: Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck</strong></p>
<p dir="auto">Hi everyone,</p>
<p dir="auto">I'm investigating an intermittent QPushButton hover issue in Qt 6.9.3 on Windows.</p>
<p dir="auto">Sometimes the mouse pointer is visibly inside a QPushButton, but the button does not enter its hover state. Moving the mouse further inside the button does not always restore the hover effect.</p>
<p dir="auto">While examining <code>QApplicationPrivate::sendMouseEvent()</code> in <code>qapplication.cpp</code>, I noticed a potentially problematic sequence:</p>
<ol>
<li>The mouse event's local Y coordinate can contain a tiny negative floating-point value, such as <code>-8.5265128291212022e-14</code>.</li>
<li><code>QRectF(receiver-&gt;rect()).contains(event-&gt;position())</code> then returns <code>false</code>.</li>
<li>This may prevent <code>dispatchEnterLeave()</code> from being called.</li>
<li>However, <code>lastMouseReceiver</code> may still be updated to <code>receiver</code>.</li>
<li>On subsequent mouse movements, <code>alienWidget</code> may already equal <code>lastMouseReceiver</code>, so another Enter event may not be generated.</li>
</ol>
<p dir="auto">My concern is that <code>lastMouseReceiver</code> could indicate that the mouse has entered the widget, while the widget's <code>WA_UnderMouse</code> attribute remains false.</p>
<p dir="auto">Could this sequence cause the hover state to remain incorrect until the mouse leaves and re-enters the widget?</p>
<p dir="auto">I haven't yet confirmed whether this is a Qt bug or an application-specific issue.</p>
<p dir="auto">Has anyone encountered similar behavior, or could someone familiar with Qt Widgets event handling help verify this logic?</p>
<p dir="auto">Thanks in advance!<br />
<img src="https://ddgobkiprc33d.cloudfront.net/650678c0-00a0-4f35-ada9-4bafb55327f5.png" alt="2f3d71d29f4c800d3b137691b1767875.png" class=" img-fluid img-markdown" /><br />
<img src="https://ddgobkiprc33d.cloudfront.net/ffa3387b-9114-4f12-bb93-742bcb84a9e4.png" alt="5d7fdb7bbd7c88a71ed1c7aac4824674.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/topic/165281/possible-missed-enter-event-in-qt-6.9.3-causing-qpushbutton-hover-state-to-get-stuck</link><generator>RSS for Node</generator><lastBuildDate>Sun, 22 Nov 2026 20:59:18 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/165281.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 18 Nov 2026 11:50:58 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck on Sun, 22 Nov 2026 17:07:13 GMT]]></title><description><![CDATA[<p dir="auto">It's already fixed - please use a recent Qt version<br />
QTBUG-128391</p>
]]></description><link>https://forum.qt.io/post/841002</link><guid isPermaLink="true">https://forum.qt.io/post/841002</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Sun, 22 Nov 2026 17:07:13 GMT</pubDate></item><item><title><![CDATA[Reply to Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck on Fri, 20 Nov 2026 08:04:40 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/donghao">@<bdi>DongHao</bdi></a><br />
<img src="https://ddgobkiprc33d.cloudfront.net/e6a8f0f3-9cd2-4a07-872c-f72d765e873f.png" alt="afabc7ef-875d-4361-8f10-ab0f6b612fac-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/840986</link><guid isPermaLink="true">https://forum.qt.io/post/840986</guid><dc:creator><![CDATA[DongHao]]></dc:creator><pubDate>Fri, 20 Nov 2026 08:04:40 GMT</pubDate></item><item><title><![CDATA[Reply to Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck on Fri, 20 Nov 2026 07:24:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a></p>
<pre><code>#include &lt;QtWidgets&gt;

int main(int argc, char **argv)
{
    QApplication app(argc, argv);
    QWidget window;
    window.setWindowTitle(QStringLiteral("MarkerHoverTest"));
    window.resize(320, 520);
    auto *layout = new QVBoxLayout(&amp;window);
    layout-&gt;setContentsMargins(8, 20, 8, 28);
    layout-&gt;setSpacing(20);

    for (int i = 1; i &lt;= 8; ++i) {
        auto *button = new QPushButton(QString::number(i), &amp;window);
        button-&gt;setFixedSize(260, 40);
        layout-&gt;addWidget(button, 0, Qt::AlignHCenter);
    }
    layout-&gt;addStretch();
    window.show();
    return app.exec();
}
</code></pre>
]]></description><link>https://forum.qt.io/post/840981</link><guid isPermaLink="true">https://forum.qt.io/post/840981</guid><dc:creator><![CDATA[DongHao]]></dc:creator><pubDate>Fri, 20 Nov 2026 07:24:45 GMT</pubDate></item><item><title><![CDATA[Reply to Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck on Fri, 20 Nov 2026 06:46:36 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a><br />
Thanks for taking a look. I’ve attached a minimal, compilable Qt Widgets example. I reproduced the issue with Qt 6.9.3 on Windows at 150% display scaling.</p>
<p dir="auto">The debugger confirmed that Qt selected the QPushButton as the mouse event receiver, but the mapped local Y coordinate was approximately -7.82e-14 at the button’s top edge. This made widgetUnderMouse false, so sendMouseEvent() skipped the Enter event. It still updated lastMouseReceiver to that button, so moving farther into the button did not trigger another Enter.</p>
<p dir="auto">I checked the upstream qtbase dev source and found the same coordinate mapping and event dispatch logic. This suggests the issue is still present upstream, though I’ve only confirmed it at runtime on Qt 6.9.3.</p>
]]></description><link>https://forum.qt.io/post/840980</link><guid isPermaLink="true">https://forum.qt.io/post/840980</guid><dc:creator><![CDATA[DongHao]]></dc:creator><pubDate>Fri, 20 Nov 2026 06:46:36 GMT</pubDate></item><item><title><![CDATA[Reply to Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck on Thu, 19 Nov 2026 12:17:01 GMT]]></title><description><![CDATA[<p dir="auto">Please post it as text, not images</p>
]]></description><link>https://forum.qt.io/post/840969</link><guid isPermaLink="true">https://forum.qt.io/post/840969</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Thu, 19 Nov 2026 12:17:01 GMT</pubDate></item><item><title><![CDATA[Reply to Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck on Thu, 19 Nov 2026 12:04:16 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a><br />
<img src="https://ddgobkiprc33d.cloudfront.net/0f61b612-5f63-47d3-9a27-3c679ce3ad3e.png" alt="a0a93d3b-20dd-41be-80be-7fb1082e4d37-image.png" class=" img-fluid img-markdown" /><br />
<img src="https://ddgobkiprc33d.cloudfront.net/a5ffd700-f773-4b49-9c76-d329b443e3ca.png" alt="3e49f450-16df-4410-984d-af64669c3a86-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/840968</link><guid isPermaLink="true">https://forum.qt.io/post/840968</guid><dc:creator><![CDATA[DongHao]]></dc:creator><pubDate>Thu, 19 Nov 2026 12:04:16 GMT</pubDate></item><item><title><![CDATA[Reply to Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck on Thu, 19 Nov 2026 11:42:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a><br />
Hi<br />
I've created a minimal example with eight QPushButtons in a QVBoxLayout. I've attached the code screenshot.<br />
<img src="https://ddgobkiprc33d.cloudfront.net/3af0e6ae-fd42-417d-8703-1ac8856e34a9.png" alt="02de40a3-5392-4454-901c-266a73dd16a3-image.png" class=" img-fluid img-markdown" /></p>
]]></description><link>https://forum.qt.io/post/840967</link><guid isPermaLink="true">https://forum.qt.io/post/840967</guid><dc:creator><![CDATA[DongHao]]></dc:creator><pubDate>Thu, 19 Nov 2026 11:42:03 GMT</pubDate></item><item><title><![CDATA[Reply to Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck on Thu, 19 Nov 2026 08:49:02 GMT]]></title><description><![CDATA[<p dir="auto">Also please provide a minimal, compilable example to reproduce the problem.</p>
]]></description><link>https://forum.qt.io/post/840965</link><guid isPermaLink="true">https://forum.qt.io/post/840965</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Thu, 19 Nov 2026 08:49:02 GMT</pubDate></item><item><title><![CDATA[Reply to Possible missed Enter event in Qt 6.9.3 causing QPushButton hover state to get stuck on Wed, 18 Nov 2026 12:36:36 GMT]]></title><description><![CDATA[<p dir="auto">Hi and welcome to devnet,</p>
<p dir="auto">Can you test with a more recent version of Qt ? 6.12 just got released and would be a better target for a fix if you can still reproduce this issue.</p>
]]></description><link>https://forum.qt.io/post/840956</link><guid isPermaLink="true">https://forum.qt.io/post/840956</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Wed, 18 Nov 2026 12:36:36 GMT</pubDate></item></channel></rss>