Windows: Fix for frameless widgets.

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>
This commit is contained in:
Friedemann Kleint 2012-04-24 10:34:46 +02:00 committed by Qt by Nokia
parent 41ea15f83d
commit 5d5d39b369

View File

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