How to specify which screen a app "opens" on
-
My desktop setup has 3 monitors. When I run an app from Qt Creator on monitor 2 and move my mouse to another monitor the app will open on the monitor my mouse is on.
I'm not sure if this is a side effect of running an app from Qt Creator or if this is just how Qt works.
Is it possible to specify in the code which monitor the app opens on? For instance I always want it to open on monitor 1.
Thanks
-
My desktop setup has 3 monitors. When I run an app from Qt Creator on monitor 2 and move my mouse to another monitor the app will open on the monitor my mouse is on.
I'm not sure if this is a side effect of running an app from Qt Creator or if this is just how Qt works.
Is it possible to specify in the code which monitor the app opens on? For instance I always want it to open on monitor 1.
Thanks
@bigguiness Basically, get a QScreen, and then call setScreen on the widget you want moved to that screen: https://doc.qt.io/qt-6/qwidget.html#setScreen
You probably want to do it before the widget is shown.