Set the window title even if it was set before calling create().

This commit is contained in:
Samuel Rødal 2011-05-02 10:38:33 +02:00
parent 5daea69f74
commit 3086f2098e
2 changed files with 3 additions and 0 deletions

View File

@ -10,6 +10,7 @@ HelloWindow::HelloWindow()
: colorIndex(0)
{
setSurfaceType(OpenGLSurface);
setWindowTitle(QLatin1String("Hello Window"));
QWindowFormat format;
format.setDepthBufferSize(16);

View 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);