mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-02 06:06:41 +00:00
Do not use a deprecated way to get dimensions of screen where current widget is located
This commit is contained in:
parent
ee9ab8d393
commit
cc1c8b2bb1
1 changed files with 2 additions and 2 deletions
|
@ -2,12 +2,12 @@
|
||||||
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QDesktopWidget>
|
|
||||||
#include <QDropEvent>
|
#include <QDropEvent>
|
||||||
#include <QEvent>
|
#include <QEvent>
|
||||||
#include <QHBoxLayout>
|
#include <QHBoxLayout>
|
||||||
#include <QHeaderView>
|
#include <QHeaderView>
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
|
#include <QScreen>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
@ -76,7 +76,7 @@ CSVWorld::TableSubView::TableSubView(
|
||||||
|
|
||||||
setWidget(widget);
|
setWidget(widget);
|
||||||
// prefer height of the screen and full width of the table
|
// 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
|
int frameHeight = 40; // set a reasonable default
|
||||||
QWidget* topLevel = QApplication::topLevelAt(pos());
|
QWidget* topLevel = QApplication::topLevelAt(pos());
|
||||||
if (topLevel)
|
if (topLevel)
|
||||||
|
|
Loading…
Reference in a new issue