<?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[Is it possible to have still active window?]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I know - this question is between QT and winapi, but maybe someone have simillar problem. I would like to prevent inactived window. I find solution:<br />
<a href="https://stackoverflow.com/questions/5142515/how-can-i-prevent-a-window-from-being-deactivated" target="_blank" rel="noopener noreferrer nofollow ugc">https://stackoverflow.com/questions/5142515/how-can-i-prevent-a-window-from-being-deactivated</a><br />
( Collin Dauphinee answer )<br />
It is bad solution for me because I can't lose activated for any milisecond ( in this solution I lose active and immediately get it ).</p>
<p dir="auto">I try:</p>
<pre><code>bool MainWindow::nativeEvent(const QByteArray &amp;eventType, void *message, long *result)
{
  Q_UNUSED(result);
  Q_UNUSED(eventType);

  MSG *msg = static_cast&lt;MSG*&gt;(message);
  if(msg-&gt;message == WM_ACTIVATE &amp;&amp; msg-&gt;wParam==WA_INACTIVE)
  {
     return true;
  }

  return false;
}
</code></pre>
<p dir="auto">But I still lose activate...</p>
]]></description><link>https://forum.qt.io/topic/121054/is-it-possible-to-have-still-active-window</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 21:07:44 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/121054.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Nov 2020 16:28:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Is it possible to have still active window? on Fri, 20 Nov 2020 18:26:13 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Do you mean that your application should always stay on top and not let any other get focus ?</p>
]]></description><link>https://forum.qt.io/post/628451</link><guid isPermaLink="true">https://forum.qt.io/post/628451</guid><dc:creator><![CDATA[SGaist]]></dc:creator><pubDate>Fri, 20 Nov 2020 18:26:13 GMT</pubDate></item></channel></rss>