<?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[How to set the default monitor for applicaiton window.]]></title><description><![CDATA[<p dir="auto">I have a three monitor setup. Whenever I run my QT application the application window always shows up on the left hand monitor. I am not sure why it does this. I have tried changing my primary monitor and it still shows up on the left monitor. Is anyone aware of a setting for this in QT creator? I could not seem to find one.</p>
]]></description><link>https://forum.qt.io/topic/134760/how-to-set-the-default-monitor-for-applicaiton-window</link><generator>RSS for Node</generator><lastBuildDate>Thu, 05 Nov 2026 14:25:14 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/134760.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 02 Mar 2022 16:42:53 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to How to set the default monitor for applicaiton window. on Mon, 14 Mar 2022 16:39:53 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/circuits">@<bdi>Circuits</bdi></a> said in <a href="/post/706353">How to set the default monitor for applicaiton window.</a>:</p>
<blockquote>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/howardharkness">@<bdi>HowardHarkness</bdi></a> Any luck with this?</p>
</blockquote>
<p dir="auto">My contract ended, and I never got to try it. It was just too far down on the list of things I had to finish. I had a lot of last-minute corrections to various errors I made :)</p>
]]></description><link>https://forum.qt.io/post/706357</link><guid isPermaLink="true">https://forum.qt.io/post/706357</guid><dc:creator><![CDATA[HowardHarkness]]></dc:creator><pubDate>Mon, 14 Mar 2022 16:39:53 GMT</pubDate></item><item><title><![CDATA[Reply to How to set the default monitor for applicaiton window. on Mon, 14 Mar 2022 15:57:01 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/howardharkness">@<bdi>HowardHarkness</bdi></a> Any luck with this?</p>
]]></description><link>https://forum.qt.io/post/706353</link><guid isPermaLink="true">https://forum.qt.io/post/706353</guid><dc:creator><![CDATA[Circuits]]></dc:creator><pubDate>Mon, 14 Mar 2022 15:57:01 GMT</pubDate></item><item><title><![CDATA[Reply to How to set the default monitor for applicaiton window. on Thu, 03 Mar 2022 14:21:45 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/howardharkness">@<bdi>HowardHarkness</bdi></a></p>
<p dir="auto">Or you work with your available screen geometry by setting/moving the widget to coordinates which are on the desired screen. This might require some calculations to be immune to resolution changes etc.<br />
But you can get the geometry of every screen from <code>QScreen</code>.<br />
Say, you have 1920x1080 + 1920x1080 (both 100%), then (1921, 0) must be top left point on second screen..<br />
[ also not tested ;-) ]</p>
]]></description><link>https://forum.qt.io/post/705004</link><guid isPermaLink="true">https://forum.qt.io/post/705004</guid><dc:creator><![CDATA[Pl45m4]]></dc:creator><pubDate>Thu, 03 Mar 2022 14:21:45 GMT</pubDate></item><item><title><![CDATA[Reply to How to set the default monitor for applicaiton window. on Thu, 03 Mar 2022 13:55:31 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/christian-ehrlicher">@<bdi>Christian-Ehrlicher</bdi></a> Thank you! I think I now have enough information. I'll give that a try today.</p>
]]></description><link>https://forum.qt.io/post/705001</link><guid isPermaLink="true">https://forum.qt.io/post/705001</guid><dc:creator><![CDATA[HowardHarkness]]></dc:creator><pubDate>Thu, 03 Mar 2022 13:55:31 GMT</pubDate></item><item><title><![CDATA[Reply to How to set the default monitor for applicaiton window. on Thu, 03 Mar 2022 13:52:34 GMT]]></title><description><![CDATA[<p dir="auto">Untested: <a href="https://doc.qt.io/qt-6/qwidget.html#windowHandle" target="_blank" rel="noopener noreferrer nofollow ugc">QWidget::windowHandle()</a> and then <a href="https://doc.qt.io/qt-6/qwindow.html#setScreen" target="_blank" rel="noopener noreferrer nofollow ugc">QWindow::setScreen()</a> on your MainWindow in main.cpp</p>
]]></description><link>https://forum.qt.io/post/704999</link><guid isPermaLink="true">https://forum.qt.io/post/704999</guid><dc:creator><![CDATA[Christian Ehrlicher]]></dc:creator><pubDate>Thu, 03 Mar 2022 13:52:34 GMT</pubDate></item><item><title><![CDATA[Reply to How to set the default monitor for applicaiton window. on Thu, 03 Mar 2022 13:42:32 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/pl45m4">@<bdi>Pl45m4</bdi></a> said in <a href="/post/704880">How to set the default monitor for application window.</a>:</p>
<blockquote>
<p dir="auto">You could specify in your main.cpp where your first app window should be displayed initially.</p>
</blockquote>
<p dir="auto">How? The primaryScreen member is defined as:</p>
<pre><code>Q_PROPERTY(QScreen *primaryScreen READ primaryScreen NOTIFY primaryScreenChanged STORED false)
</code></pre>
<p dir="auto">I could not find any "setter" function. I gather that I have to generate a "signal" somehow (to "notify" the primaryScreenChanged), but I'm a relative noob on Qt, and I'm not sure how to do that.</p>
<p dir="auto">The reason I chimed in on this thread is that I have a similar problem -- except that when I run my application, it seems to sometimes randomly pick one of my 3 monitors. It's usually the monitor on which I have the IDE open, but not always.</p>
<p dir="auto">Ideally, I would like to get a list of the monitors (QGuiApplication::screens()), and pick one that has a screen resolution of 1920x1080 and a 100% scale. I'd settle for just setting the 1920x1080 screen as my main screen.</p>
<p dir="auto">I'm using Qt 5.14 (customer requirement) and MinGW 32-bit C++.</p>
]]></description><link>https://forum.qt.io/post/704997</link><guid isPermaLink="true">https://forum.qt.io/post/704997</guid><dc:creator><![CDATA[HowardHarkness]]></dc:creator><pubDate>Thu, 03 Mar 2022 13:42:32 GMT</pubDate></item><item><title><![CDATA[Reply to How to set the default monitor for applicaiton window. on Wed, 02 Mar 2022 19:10:03 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/circuits">@<bdi>Circuits</bdi></a> said in <a href="/post/704867">How to set the default monitor for applicaiton window.</a>:</p>
<blockquote>
<p dir="auto">I am not sure why it does this.</p>
</blockquote>
<p dir="auto">Probably because the desktop coordinate system starts top left with (0, 0).</p>
<p dir="auto">See:</p>
<ul>
<li><a href="https://doc.qt.io/qt-5/qscreen.html" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qscreen.html</a></li>
</ul>
<p dir="auto">Get primaryScreen:</p>
<ul>
<li><a href="https://doc.qt.io/qt-5/qguiapplication.html#primaryScreen-prop" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qguiapplication.html#primaryScreen-prop</a></li>
</ul>
<p dir="auto">List all detected/available screens:</p>
<ul>
<li><a href="https://doc.qt.io/qt-5/qguiapplication.html#screens" target="_blank" rel="noopener noreferrer nofollow ugc">https://doc.qt.io/qt-5/qguiapplication.html#screens</a></li>
</ul>
<p dir="auto">You could specify in your <code>main.cpp</code> where your first app window should be displayed initially.</p>
]]></description><link>https://forum.qt.io/post/704880</link><guid isPermaLink="true">https://forum.qt.io/post/704880</guid><dc:creator><![CDATA[Pl45m4]]></dc:creator><pubDate>Wed, 02 Mar 2022 19:10:03 GMT</pubDate></item></channel></rss>