diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 21c02ce..201d10a 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -20,7 +21,7 @@ MainWindow::MainWindow() { setWindowTitle(tr("Bullock")); - auto screenSize = QApplication::desktop()->screenGeometry(); + auto screenSize = QGuiApplication::screens().first()->geometry(); constexpr auto sizePct = 0.85; resize(screenSize.width() * sizePct, screenSize.height() * sizePct); move(-x(), -y());