Set the window title even if it was set before calling create().
authorSamuel Rødal <samuel.rodal@nokia.com>
Mon, 2 May 2011 08:38:33 +0000 (10:38 +0200)
committerSamuel Rødal <samuel.rodal@nokia.com>
Mon, 2 May 2011 08:38:33 +0000 (10:38 +0200)
examples/opengl/hellowindow/hellowindow.cpp
src/gui/kernel/qwindow_qpa.cpp

index b0576c1..8076b5a 100644 (file)
@@ -10,6 +10,7 @@ HelloWindow::HelloWindow()
     : colorIndex(0)
 {
     setSurfaceType(OpenGLSurface);
+    setWindowTitle(QLatin1String("Hello Window"));
 
     QWindowFormat format;
     format.setDepthBufferSize(16);
index 67eeb94..aa23683 100644 (file)
@@ -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);