1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-13 21:40:11 +00:00

Do not use a deprecated way to get dimensions of screen where current widget is located

This commit is contained in:
Andrei Kortunov 2023-01-15 18:37:40 +04:00
parent ee9ab8d393
commit cc1c8b2bb1

View File

@ -2,12 +2,12 @@
#include <QApplication>
#include <QCheckBox>
#include <QDesktopWidget>
#include <QDropEvent>
#include <QEvent>
#include <QHBoxLayout>
#include <QHeaderView>
#include <QPushButton>
#include <QScreen>
#include <QVBoxLayout>
#include <algorithm>
@ -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)