<?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[Windows with Qt:Tool flag shown on all desktops on Windows OS]]></title><description><![CDATA[<p dir="auto">I've noticed that windows which have the Qt::Tool flag set, are shown on all desktops on Windows OS. Does anybody know if there's a way to prevent this from happening? (I don't mind if there's a need to make platform specific calls to do this).</p>
]]></description><link>https://forum.qt.io/topic/141915/windows-with-qt-tool-flag-shown-on-all-desktops-on-windows-os</link><generator>RSS for Node</generator><lastBuildDate>Mon, 11 May 2026 06:51:39 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/141915.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Jan 2023 12:07:19 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Windows with Qt:Tool flag shown on all desktops on Windows OS on Wed, 04 Jan 2023 13:26:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/gvanvoor">@<bdi>gvanvoor</bdi></a> Yeah, unfortunately it's a Windows API behavior, so you'd have to ask someone from Microsoft if that's intended and if there's a workaround.<br />
Maybe you can fiddle with the <a href="https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ivirtualdesktopmanager-movewindowtodesktop" target="_blank" rel="noopener noreferrer nofollow ugc">virtual desktop manager API</a>, but I haven't tried it so can't give you specifics.</p>
]]></description><link>https://forum.qt.io/post/742488</link><guid isPermaLink="true">https://forum.qt.io/post/742488</guid><dc:creator><![CDATA[Chris Kawa]]></dc:creator><pubDate>Wed, 04 Jan 2023 13:26:02 GMT</pubDate></item><item><title><![CDATA[Reply to Windows with Qt:Tool flag shown on all desktops on Windows OS on Wed, 04 Jan 2023 13:14:21 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/chris-kawa">@<bdi>Chris-Kawa</bdi></a> Thanks for the info. Since the windows that have the flag set in my application need to have it, users will have to learn to live with it.</p>
]]></description><link>https://forum.qt.io/post/742484</link><guid isPermaLink="true">https://forum.qt.io/post/742484</guid><dc:creator><![CDATA[gvanvoor]]></dc:creator><pubDate>Wed, 04 Jan 2023 13:14:21 GMT</pubDate></item><item><title><![CDATA[Reply to Windows with Qt:Tool flag shown on all desktops on Windows OS on Tue, 03 Jan 2023 14:38:38 GMT]]></title><description><![CDATA[<p dir="auto">Tool windows have a <code>WS_EX_TOOLWINDOW</code> style flag set, so the window manager styles them appropriately. This flag is also what causes this behavior and a lot of apps (not just Qt based) experience this. It doesn't seem to be documented anywhere on Microsoft's sites though, so it's hard to say if it's a bug or a feature.</p>
<p dir="auto">So whether that's intentional or not that's just how tool windows behave on virtual desktops. The only way to prevent this I know is to remove that style flag. You can do that with native <a href="https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-setwindowlongw" target="_blank" rel="noopener noreferrer nofollow ugc">SetWindowLong</a> to set <code>GWL_EXSTYLE</code>, but that's basically the same as just not using the <code>Qt::Tool</code> flag and will make your window not look/behave like a tool window.</p>
]]></description><link>https://forum.qt.io/post/742318</link><guid isPermaLink="true">https://forum.qt.io/post/742318</guid><dc:creator><![CDATA[Chris Kawa]]></dc:creator><pubDate>Tue, 03 Jan 2023 14:38:38 GMT</pubDate></item></channel></rss>