summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/qpa/windows/window.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/examples/qpa/windows/window.cpp b/examples/qpa/windows/window.cpp
index 0f3355b86b..d08db5714b 100644
--- a/examples/qpa/windows/window.cpp
+++ b/examples/qpa/windows/window.cpp
@@ -1,6 +1,6 @@
#include "window.h"
-#include <private/qguiapplication_qpa_p.h>
+#include <private/qguiapplication_p.h>
#include <private/qwindowsurface_p.h>
#include <QPainter>
@@ -15,22 +15,17 @@ QColor colorTable[] =
};
Window::Window(QWindow *parent)
- : QWindow(0)
+ : QWindow(parent)
, m_backgroundColorIndex(colorIndexId++)
{
setSurfaceType(RasterSurface);
setWindowTitle(QLatin1String("Window"));
if (parent)
- setGeometry(QRect(10, 10, 40, 40));
+ setGeometry(QRect(160, 120, 320, 240));
else
setGeometry(QRect(10, 10, 640, 480));
- if (parent) {
- setParent(parent);
- setGeometry(QRect(160, 120, 320, 240));
- }
-
create();
QGuiApplicationPrivate::platformIntegration()->createWindowSurface(this, winId());