Get screen of your app
Unsolved
General and Desktop
-
wrote on 9 Dec 2019, 15:46 last edited by
With the switch to QT 5.13.2 we are updating code that uses QDesktopWidget.
What is the proper way to find the QScreen that your application is running on (the mainwindow at least). And thus be able to get the geometry?
Regards,
Marcel
-
Hi
Maybe this can help `
https://forum.qt.io/topic/98160/find-the-active-qscreen-of-any-qwidget -
wrote on 11 Dec 2019, 14:47 last edited by qwasder85 12 Nov 2019, 14:50
QScreen* p_screen = QApplication::screens().at(0); //Returns the "main" screen
Edit: Ah, sorry. This will NOT return the screen that your main window is located on, only what Windows considers your main display.
2/3