qmlscene: Set window flags correctly.

Task-number: QTBUG-31258

Change-Id: I13dfc17c75075de155505d20c57400753de0a71d
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
This commit is contained in:
Friedemann Kleint 2013-05-22 17:18:46 +02:00 committed by The Qt Project
parent 8a3d48915c
commit 745621a90b
1 changed files with 3 additions and 1 deletions

View File

@ -491,7 +491,6 @@ int main(int argc, char ** argv)
// Set window default properties; the qml can still override them
QString oname = contentItem->objectName();
window->setTitle(oname.isEmpty() ? QString::fromLatin1("qmlscene") : QString::fromLatin1("qmlscene: ") + oname);
window->setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint);
if (options.resizeViewToRootItem)
qxView->setResizeMode(QQuickView::SizeViewToRootObject);
else
@ -512,6 +511,9 @@ int main(int argc, char ** argv)
}
window->setFormat(surfaceFormat);
if (window->flags() == Qt::Window) // Fix window flags unless set by QML.
window->setFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint);
if (options.fullscreen)
window->showFullScreen();
else if (options.maximized)