From 09e72687799ebd34b0ae15913f5d8bd1d9e66b88 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Mon, 27 May 2019 08:54:24 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/libs@539 a8b55f48-bf90-11e4-a774-851b48703e85 --- qglview/glwidget.cpp | 1 + qglview/openglwindow.cpp | 4 ++-- qglview/openglwindow.h | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/qglview/glwidget.cpp b/qglview/glwidget.cpp index 364af9b..e97228e 100644 --- a/qglview/glwidget.cpp +++ b/qglview/glwidget.cpp @@ -12,4 +12,5 @@ GLWidget::GLWidget(QWidget *parent) : QWidget(parent) lay->addWidget(container); lay->setContentsMargins(0, 0, 0, 0); lay->setSpacing(0); + setMouseTracking(true); } diff --git a/qglview/openglwindow.cpp b/qglview/openglwindow.cpp index a2813a8..6b033d4 100644 --- a/qglview/openglwindow.cpp +++ b/qglview/openglwindow.cpp @@ -8,8 +8,8 @@ OpenGLWindow::OpenGLWindow(QWindow *parent) : QWindow(parent) , m_animating(false) - , m_context(0) - , m_device(0) + , m_context(nullptr) + , m_device(nullptr) { setFlag(Qt::FramelessWindowHint); setSurfaceType(QWindow::OpenGLSurface); diff --git a/qglview/openglwindow.h b/qglview/openglwindow.h index 19ae683..d9338bd 100644 --- a/qglview/openglwindow.h +++ b/qglview/openglwindow.h @@ -10,7 +10,7 @@ class OpenGLWindow : public QWindow, protected QOpenGLFunctions { Q_OBJECT public: - explicit OpenGLWindow(QWindow *parent = 0); + explicit OpenGLWindow(QWindow *parent = nullptr); ~OpenGLWindow(); virtual void render(QPainter *painter);