summaryrefslogtreecommitdiffstats
path: root/examples/opengl/2dpainting/window.cpp
diff options
context:
space:
mode:
authorhjk <qthjk@ovi.com>2012-12-19 11:27:10 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-12-28 20:44:55 +0100
commit0136252cb2973824b7f97abad1d4c3a4d9301178 (patch)
tree2e03b3946253216d6ce3a010d4155c36f3e834b7 /examples/opengl/2dpainting/window.cpp
parent4eac2c4728da85a5cdf91ec25170b3417f7deb68 (diff)
Polish code of some opengl examples
Change-Id: If24ae1845176fc525cf6a239a5079f4802f8df3f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'examples/opengl/2dpainting/window.cpp')
-rw-r--r--examples/opengl/2dpainting/window.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/opengl/2dpainting/window.cpp b/examples/opengl/2dpainting/window.cpp
index 700d0caaa8..b6aba2a945 100644
--- a/examples/opengl/2dpainting/window.cpp
+++ b/examples/opengl/2dpainting/window.cpp
@@ -38,15 +38,19 @@
**
****************************************************************************/
-#include <QtWidgets>
#include "glwidget.h"
#include "widget.h"
#include "window.h"
+#include <QGridLayout>
+#include <QLabel>
+#include <QTimer>
+
//! [0]
Window::Window()
- : QWidget()
{
+ setWindowTitle(tr("2D Painting on Native and OpenGL Widgets"));
+
Widget *native = new Widget(&helper, this);
GLWidget *openGL = new GLWidget(&helper, this);
QLabel *nativeLabel = new QLabel(tr("Native"));
@@ -65,7 +69,5 @@ Window::Window()
connect(timer, SIGNAL(timeout()), native, SLOT(animate()));
connect(timer, SIGNAL(timeout()), openGL, SLOT(animate()));
timer->start(50);
-
- setWindowTitle(tr("2D Painting on Native and OpenGL Widgets"));
}
//! [0]