QDesktopWidget::.screenGeometry() from a Thread
Solved
General and Desktop
-
Hi,
I am trying to get the exact geometry of every screen in a thread (ran by QThread).
It seems that QScreen has not the functionality i want. QScreen::availableGeometry() excludes the taskbar from the geometry.The alternative is QDesktopWidget::.screenGeometry(screenIndex). However i cannot initiate a QDesktopWidget in my thread.
ASSERT failure in QWidget: "Widgets must be created in the GUI thread."What is the alternative for this to get the info in a thread?
Kind Regards
eKKiM -
Hi and welcome to devnet,
Did you create a QApplication in your main.cpp ?