Windows: Fix for frameless widgets.
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>
Tue, 24 Apr 2012 08:34:46 +0000 (10:34 +0200)
committerQt by Nokia <qt-info@nokia.com>
Tue, 24 Apr 2012 08:45:40 +0000 (10:45 +0200)
Let Qt::FramelessWindowHint take precedence over
Qt::WindowTitleHint (which enforces WS_CAPTION and thus
WS_DLGFRAME).

Change-Id: I2c0248d8a3ee3ed0f04b926acdef3cbeb98ca571
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
src/plugins/platforms/windows/qwindowswindow.cpp

index 38a44e2..8798048 100644 (file)
@@ -338,9 +338,9 @@ void WindowCreationData::fromWindow(const QWindow *w, const Qt::WindowFlags flag
                     } else {
                         style |= WS_THICKFRAME;
                     }
+                    if (flags & Qt::WindowTitleHint)
+                        style |= WS_CAPTION; // Contains WS_DLGFRAME
                 }
-                if (flags & Qt::WindowTitleHint)
-                    style |= WS_CAPTION;
                 if (flags & Qt::WindowSystemMenuHint)
                     style |= WS_SYSMENU;
                 if (flags & Qt::WindowMinimizeButtonHint)