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ø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
4e4057460a
commit
d615fb39d5
@ -165,6 +165,11 @@ void QMacCocoaViewContainer::setCocoaView(NSView *view)
|
||||
Q_ASSERT(window->handle());
|
||||
|
||||
[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);
|
||||
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
x
Reference in New Issue
Block a user