setGeometry deprecated
Unsolved
General and Desktop
-
I wrote:
QRect screenRect = QApplication::desktop()->screenGeometry(1); // 0-indexed, so this would get the second screen this->move(QPoint(screenRect.x(), screenRect.y()));
but it's deprecated, so how I can write?
-
Hi,
What setGeometry are you talking about ?
-
I'm pretty sure I suggested to you to use
screens()
to query your desktopQRect screenRect = QGuiApplication::screens().at(1)->availableGeometry();
You're aware that you're not checking if 2 screens are available before hand. This may at any time crash.
@SGaist setGeometry == screenGeometry, I presume.