summaryrefslogtreecommitdiffstats
path: root/examples/opengl/openglwindow/openglwindow.h
diff options
context:
space:
mode:
Diffstat (limited to 'examples/opengl/openglwindow/openglwindow.h')
-rw-r--r--examples/opengl/openglwindow/openglwindow.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/examples/opengl/openglwindow/openglwindow.h b/examples/opengl/openglwindow/openglwindow.h
index 7206fc57ef..41bcbab9c4 100644
--- a/examples/opengl/openglwindow/openglwindow.h
+++ b/examples/opengl/openglwindow/openglwindow.h
@@ -1,14 +1,15 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
+#ifndef OPENGLWINDOW_H
+#define OPENGLWINDOW_H
+
#include <QWindow>
#include <QOpenGLFunctions>
-QT_BEGIN_NAMESPACE
-class QPainter;
-class QOpenGLContext;
-class QOpenGLPaintDevice;
-QT_END_NAMESPACE
+QT_FORWARD_DECLARE_CLASS(QPainter)
+QT_FORWARD_DECLARE_CLASS(QOpenGLContext)
+QT_FORWARD_DECLARE_CLASS(QOpenGLPaintDevice)
//! [1]
class OpenGLWindow : public QWindow, protected QOpenGLFunctions
@@ -42,3 +43,4 @@ private:
};
//! [1]
+#endif // OPENGLWINDOW_H