path: root/src
diff options
authorMorten Johan Sørvig <>2018-08-17 09:47:59 +0200
committerMorten Johan Sørvig <>2018-09-02 20:14:40 +0000
commitd615fb39d58d61d244a460ee13f11c73431a35e5 (patch)
treebcf93d7dd519bc311754eb2a9fa9278b231a35eb /src
parent4e4057460a0b27e4a8eff749fb284f61f245982e (diff)
Make QMacCocoaViewContainer work again
The widget visibility state was set to explicitly hidden, which was preventing it from working correctly when its parent widget was shown. This regression was introduced by commit d7a9e08, which made QWindow::setVisible() call QWidget::setVisible(). QWindow::destroy() calls QWindow::setVisible(false), which means that the destroy() call in setCocoaView() would set the CoocaViewContainer to be explicitly hidden. Clear WA_WState_Hidden to work around this behavior. Task-number: QTBUG-67504 Change-Id: I77438fcd01f165f058eea178c214838bd4f27084 Reviewed-by: Tor Arne Vestbø <>
Diffstat (limited to 'src')
1 files changed, 5 insertions, 0 deletions
diff --git a/src/widgets/widgets/ b/src/widgets/widgets/
index 98ee90deb7..0b64b2a2bb 100644
--- a/src/widgets/widgets/
+++ b/src/widgets/widgets/
@@ -165,6 +165,11 @@ void QMacCocoaViewContainer::setCocoaView(NSView *view)
[oldView release];
+ // The QWindow::destroy()) call above will explicitly hide this widget.
+ // Clear the hidden state here so it can be implicitly shown again.
+ setAttribute(Qt::WA_WState_Hidden, false);