Class QDesktopWidget is obsolete.
--HG-- branch : develop
This commit is contained in:
parent
875ea849b2
commit
71e1cc33c0
|
@ -45,9 +45,9 @@
|
|||
#include <QTransform>
|
||||
#include <QWheelEvent>
|
||||
#include <QWidget>
|
||||
#include <QDesktopWidget>
|
||||
#include <QThread>
|
||||
#include <QGestureEvent>
|
||||
#include <QScreen>
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||
# include <QOpenGLWidget>
|
||||
|
@ -645,7 +645,7 @@ void VMainGraphicsView::mouseDoubleClickEvent(QMouseEvent *event)
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
qreal VMainGraphicsView::MinScale()
|
||||
{
|
||||
const QRect screenRect = QApplication::desktop()->availableGeometry();
|
||||
const QRect screenRect = QGuiApplication::primaryScreen()->availableGeometry();
|
||||
const qreal screenSize = qMin(screenRect.width(), screenRect.height());
|
||||
|
||||
return screenSize / maxSceneSize;
|
||||
|
@ -654,7 +654,7 @@ qreal VMainGraphicsView::MinScale()
|
|||
//---------------------------------------------------------------------------------------------------------------------
|
||||
qreal VMainGraphicsView::MaxScale()
|
||||
{
|
||||
const QRect screenRect = QApplication::desktop()->availableGeometry();
|
||||
const QRect screenRect = QGuiApplication::primaryScreen()->availableGeometry();
|
||||
const qreal screenSize = qMin(screenRect.width(), screenRect.height());
|
||||
|
||||
return maxSceneSize / screenSize;
|
||||
|
|
Loading…
Reference in New Issue
Block a user