No primaryScreen property
Before change to SingleApplication I have
int main(int argc, char **argv)
{
QApplication app(argc, argv);
QScreen *screen = QGuiApplication::primaryScreen();
QRect screenGeometry = screen->geometry();
MainWindow mainWindow;
mainWindow.resize(int(screenGeometry.width()*0.8), int(screenGeometry.height()*0.8));
mainWindow.show();
return app.exec();
}
After change QApplication to SingleApplication, screen is NULL. How can this be a workaround?
Did you set the QAPPLICATION_CLASS macro to QGuiApplication?
On Sat, 13 Aug 2022, 21:18 Andrzej Borucki, @.***> wrote:
Before change to SingleApplication I have
int main(int argc, char **argv) { QApplication app(argc, argv);
QScreen *screen = QGuiApplication::primaryScreen(); QRect screenGeometry = screen->geometry(); MainWindow mainWindow; mainWindow.resize(int(screenGeometry.width()*0.8), int(screenGeometry.height()*0.8)); mainWindow.show(); return app.exec();}
After change QApplication to SingleApplication, screen is NULL. How can this be a workaround?
— Reply to this email directly, view it on GitHub https://github.com/itay-grudev/SingleApplication/issues/164, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAQGP53H4NOZJP46ENV2GDLVY7RGPANCNFSM56OQESAA . You are receiving this because you are subscribed to this thread.Message ID: @.***>