diff --git a/examples/opengl/hellowindow/hellowindow.cpp b/examples/opengl/hellowindow/hellowindow.cpp index b0576c1255d..8076b5a4bb2 100644 --- a/examples/opengl/hellowindow/hellowindow.cpp +++ b/examples/opengl/hellowindow/hellowindow.cpp @@ -10,6 +10,7 @@ HelloWindow::HelloWindow() : colorIndex(0) { setSurfaceType(OpenGLSurface); + setWindowTitle(QLatin1String("Hello Window")); QWindowFormat format; format.setDepthBufferSize(16); diff --git a/src/gui/kernel/qwindow_qpa.cpp b/src/gui/kernel/qwindow_qpa.cpp index 67eeb94e725..aa236836540 100644 --- a/src/gui/kernel/qwindow_qpa.cpp +++ b/src/gui/kernel/qwindow_qpa.cpp @@ -88,6 +88,8 @@ void QWindow::create() if (!d->platformWindow) { d->platformWindow = QApplicationPrivate::platformIntegration()->createPlatformWindow(this); d->windowFlags = d->platformWindow->setWindowFlags(d->windowFlags); + if (!d->windowTitle.isNull()) + d->platformWindow->setWindowTitle(d->windowTitle); } Q_ASSERT(d->platformWindow);