diff --git a/limereport/lrpreviewreportwindow.cpp b/limereport/lrpreviewreportwindow.cpp index 7abea25..0619fde 100644 --- a/limereport/lrpreviewreportwindow.cpp +++ b/limereport/lrpreviewreportwindow.cpp @@ -79,10 +79,10 @@ void PreviewReportWindow::restoreSetting() if (v.isValid()){ restoreGeometry(v.toByteArray()); } else { - QScreen *screen = QApplication::primaryScreen(); + QDesktopWidget *desktop = QApplication::desktop(); - int screenWidth = screen->virtualGeometry().width(); - int screenHeight = screen->virtualGeometry().height(); + int screenWidth = desktop->screenGeometry().width(); + int screenHeight = desktop->screenGeometry().height(); int x = screenWidth*0.1; int y = screenHeight*0.1; diff --git a/limereport/lrreportdesignwindow.cpp b/limereport/lrreportdesignwindow.cpp index 0edf33c..b0ebae7 100644 --- a/limereport/lrreportdesignwindow.cpp +++ b/limereport/lrreportdesignwindow.cpp @@ -602,10 +602,10 @@ void ReportDesignWindow::restoreSetting() if (v.isValid()){ restoreGeometry(v.toByteArray()); } else { - QScreen *screen = QApplication::primaryScreen(); + QDesktopWidget *desktop = QApplication::desktop(); - int screenWidth = screen->virtualGeometry().width(); - int screenHeight = screen->virtualGeometry().height(); + int screenWidth = desktop->screenGeometry().width(); + int screenHeight = desktop->screenGeometry().height(); int x = screenWidth*0.1; int y = screenHeight*0.1;