<?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[QTimer events not executed when holding minimize&#x2F;maximize&#x2F;close button.]]></title><description><![CDATA[<p dir="auto">I noticed that events are not being executed when I hold down the minimize, maximize or close key in Windows 7.</p>
<p dir="auto">Is there some way to work around this without creating threads?</p>
]]></description><link>https://forum.qt.io/topic/55416/qtimer-events-not-executed-when-holding-minimize-maximize-close-button</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 17:09:30 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/55416.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 18 Jun 2015 10:55:48 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to QTimer events not executed when holding minimize&#x2F;maximize&#x2F;close button. on Thu, 18 Jun 2015 13:01:36 GMT]]></title><description><![CDATA[<p dir="auto">Or I just disable/hide the misbehaving keys.<br />
<code>setWindowFlags( Qt::WindowCloseButtonHint );</code> or <code>setWindowFlags( Qt::WindowTitleHint );</code></p>
<p dir="auto">Creating thread makes the overall software design too complicated.</p>
]]></description><link>https://forum.qt.io/post/278647</link><guid isPermaLink="true">https://forum.qt.io/post/278647</guid><dc:creator><![CDATA[Jeroen3]]></dc:creator><pubDate>Thu, 18 Jun 2015 13:01:36 GMT</pubDate></item><item><title><![CDATA[Reply to QTimer events not executed when holding minimize&#x2F;maximize&#x2F;close button. on Thu, 18 Jun 2015 12:32:37 GMT]]></title><description><![CDATA[<p dir="auto">So a thread it is.  :)</p>
<p dir="auto">If you really, really dont want a thread,<br />
you could look into using a timer callback instead of events.<br />
This is windows only. / not portable.<br />
<a href="https://msdn.microsoft.com/en-us/library/windows/desktop/ms644901(v=vs.85).aspx" target="_blank" rel="noopener noreferrer nofollow ugc">https://msdn.microsoft.com/en-us/library/windows/desktop/ms644901(v=vs.85).aspx</a></p>
<p dir="auto">Reading the documentation, it seems Qt demands a message loop for Qt-timers.</p>
]]></description><link>https://forum.qt.io/post/278640</link><guid isPermaLink="true">https://forum.qt.io/post/278640</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 18 Jun 2015 12:32:37 GMT</pubDate></item><item><title><![CDATA[Reply to QTimer events not executed when holding minimize&#x2F;maximize&#x2F;close button. on Thu, 18 Jun 2015 11:52:21 GMT]]></title><description><![CDATA[<p dir="auto">Wel, I did create the event override.</p>
<pre><code>bool MainWindow::event(QEvent * e){
    qDebug() debugprefix &lt;&lt; e-&gt;type();
    return QMainWindow::event(e) ;
}
</code></pre>
<p dir="auto">And when holding any of the 3 controls, all events stop.</p>
]]></description><link>https://forum.qt.io/post/278639</link><guid isPermaLink="true">https://forum.qt.io/post/278639</guid><dc:creator><![CDATA[Jeroen3]]></dc:creator><pubDate>Thu, 18 Jun 2015 11:52:21 GMT</pubDate></item><item><title><![CDATA[Reply to QTimer events not executed when holding minimize&#x2F;maximize&#x2F;close button. on Thu, 18 Jun 2015 11:23:06 GMT]]></title><description><![CDATA[<p dir="auto">A C++ builder program does the same thing so its a windows thing/normal.<br />
You could try to override event and see if any event is sent when "holding".<br />
I assume the button get all events and hence no WM_TIMER is sent to the main window.</p>
<p dir="auto">bool MyMainWindow::event(QEvent * e)<br />
{<br />
switch(e-&gt;type())<br />
{<br />
} ;<br />
return QMainWindow::event(e) ;<br />
}</p>
]]></description><link>https://forum.qt.io/post/278635</link><guid isPermaLink="true">https://forum.qt.io/post/278635</guid><dc:creator><![CDATA[mrjj]]></dc:creator><pubDate>Thu, 18 Jun 2015 11:23:06 GMT</pubDate></item></channel></rss>