I'm trying to use the QDesktopWidget class, just to resize a window. It appears to be the main class to get the geometry of a user's screen, but Qt cannot find it.
I tried adding QT += widgets
in my .pro file, followed by running qmake, but unfortunately this did not work.
From the Qt documentation (emphasis mine):
QDesktopWidget was already deprecated in Qt 5, and has been removed in Qt 6, together with QApplication::desktop().
QScreen provides equivalent functionality to query for information about available screens, screen that form a virtual desktop, and screen geometries.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With