From cc1c8b2bb140500ebdf1482966defa60d2e4d1a9 Mon Sep 17 00:00:00 2001 From: Andrei Kortunov Date: Sun, 15 Jan 2023 18:37:40 +0400 Subject: [PATCH] Do not use a deprecated way to get dimensions of screen where current widget is located --- apps/opencs/view/world/tablesubview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/opencs/view/world/tablesubview.cpp b/apps/opencs/view/world/tablesubview.cpp index 9be0afd912..e6f2df938e 100644 --- a/apps/opencs/view/world/tablesubview.cpp +++ b/apps/opencs/view/world/tablesubview.cpp @@ -2,12 +2,12 @@ #include #include -#include #include #include #include #include #include +#include #include #include @@ -76,7 +76,7 @@ CSVWorld::TableSubView::TableSubView( setWidget(widget); // prefer height of the screen and full width of the table - const QRect rect = QApplication::desktop()->screenGeometry(this); + const QRect rect = QApplication::screenAt(pos())->geometry(); int frameHeight = 40; // set a reasonable default QWidget* topLevel = QApplication::topLevelAt(pos()); if (topLevel)