summaryrefslogtreecommitdiffstats
path: root/examples/opengl/hellogl
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/hellogl')
-rw-r--r--examples/opengl/hellogl/glwidget.cpp6
-rw-r--r--examples/opengl/hellogl/glwidget.h14
-rw-r--r--examples/opengl/hellogl/window.h2
3 files changed, 11 insertions, 11 deletions
diff --git a/examples/opengl/hellogl/glwidget.cpp b/examples/opengl/hellogl/glwidget.cpp
index 29879fa804..3a9faaca5f 100644
--- a/examples/opengl/hellogl/glwidget.cpp
+++ b/examples/opengl/hellogl/glwidget.cpp
@@ -100,7 +100,7 @@ void GLWidget::setXRotation(int angle)
if (angle != xRot) {
xRot = angle;
emit xRotationChanged(angle);
- updateGL();
+ update();
}
}
//! [5]
@@ -111,7 +111,7 @@ void GLWidget::setYRotation(int angle)
if (angle != yRot) {
yRot = angle;
emit yRotationChanged(angle);
- updateGL();
+ update();
}
}
@@ -121,7 +121,7 @@ void GLWidget::setZRotation(int angle)
if (angle != zRot) {
zRot = angle;
emit zRotationChanged(angle);
- updateGL();
+ update();
}
}
diff --git a/examples/opengl/hellogl/glwidget.h b/examples/opengl/hellogl/glwidget.h
index 3344e931e7..0989be1dc6 100644
--- a/examples/opengl/hellogl/glwidget.h
+++ b/examples/opengl/hellogl/glwidget.h
@@ -54,8 +54,8 @@ public:
GLWidget(QWidget *parent = 0);
~GLWidget();
- QSize minimumSizeHint() const;
- QSize sizeHint() const;
+ QSize minimumSizeHint() const Q_DECL_OVERRIDE;
+ QSize sizeHint() const Q_DECL_OVERRIDE;
//! [0]
//! [1]
@@ -72,11 +72,11 @@ signals:
//! [2]
protected:
- void initializeGL();
- void paintGL();
- void resizeGL(int width, int height);
- void mousePressEvent(QMouseEvent *event);
- void mouseMoveEvent(QMouseEvent *event);
+ void initializeGL() Q_DECL_OVERRIDE;
+ void paintGL() Q_DECL_OVERRIDE;
+ void resizeGL(int width, int height) Q_DECL_OVERRIDE;
+ void mousePressEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
+ void mouseMoveEvent(QMouseEvent *event) Q_DECL_OVERRIDE;
//! [2]
//! [3]
diff --git a/examples/opengl/hellogl/window.h b/examples/opengl/hellogl/window.h
index 68862fbcfe..900e6b13fc 100644
--- a/examples/opengl/hellogl/window.h
+++ b/examples/opengl/hellogl/window.h
@@ -57,7 +57,7 @@ public:
Window();
protected:
- void keyPressEvent(QKeyEvent *event);
+ void keyPressEvent(QKeyEvent *event) Q_DECL_OVERRIDE;
private:
QSlider *createSlider();