From ec63f5fbf3927b184f234f95c6003fe8496d8b9f Mon Sep 17 00:00:00 2001 From: Shawn Rutledge <shawn.rutledge@digia.com> Date: Wed, 15 Oct 2014 14:00:05 +0200 Subject: [PATCH] docs: WindowType is important for dialogs to center themselves Task-number: QTBUG-41844 Task-number: QTBUG-36185 Change-Id: I61605006048e81d2666eea34f4d041124a24199f Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> --- src/gui/kernel/qwindow.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index b0fbbc15701..99bf469f871 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -1122,6 +1122,10 @@ Qt::WindowState QWindow::windowState() const This is a hint to the window manager that this window is a dialog or pop-up on behalf of the given window. + In order to cause the window to be centered above its transient parent by + default, depending on the window manager, it may also be necessary to call + setFlags() with a suitable \l Qt::WindowType (such as \c Qt::Dialog). + \sa transientParent(), parent() */ void QWindow::setTransientParent(QWindow *parent) -- GitLab