diff options
Diffstat (limited to 'src/gui/kernel/qwindow.cpp')
-rw-r--r-- | src/gui/kernel/qwindow.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/kernel/qwindow.cpp b/src/gui/kernel/qwindow.cpp index 691bc5c269..ca3e5f274d 100644 --- a/src/gui/kernel/qwindow.cpp +++ b/src/gui/kernel/qwindow.cpp @@ -526,6 +526,13 @@ void QWindowPrivate::create(bool recursive, WId nativeHandle) if (q->parent()) q->parent()->create(); + if (platformWindow) { + // Creating the parent window will end up creating any child window + // that was already visible, via setVisible. If this applies to us, + // we will already have a platform window at this point. + return; + } + // QPlatformWindow will poll geometry() during construction below. Set the // screen here so that high-dpi scaling will use the correct scale factor. if (q->isTopLevel()) { |