Update QMdiSubWindow after windowFlags were changed
Adding or removing close/maximize/minimize buttons to an already existing QMdiSubWindow is only visible after the window is repainted. This patch repaints the QMdiSubWindow at the end of setWindowFlags. Fixes: QTBUG-125778 Pick-to: 6.7 Change-Id: Ibdf136621bf70337a2af29dfcfd10b60dde11e15 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 6520ed0f2567c5a8fd680dccbff59c5ef8fc89c2) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
e7aa8aa118
commit
c561b7197b
@ -2095,6 +2095,7 @@ void QMdiSubWindowPrivate::setVisible(WindowStateAction action, bool visible)
|
|||||||
(controlContainer->controllerWidget())) {
|
(controlContainer->controllerWidget())) {
|
||||||
ctrlWidget->setControlVisible(action, visible);
|
ctrlWidget->setControlVisible(action, visible);
|
||||||
}
|
}
|
||||||
|
q->update();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef QT_NO_ACTION
|
#ifndef QT_NO_ACTION
|
||||||
@ -2867,6 +2868,13 @@ bool QMdiSubWindow::event(QEvent *event)
|
|||||||
showToolTip(static_cast<QHelpEvent *>(event), this, d->titleBarOptions(),
|
showToolTip(static_cast<QHelpEvent *>(event), this, d->titleBarOptions(),
|
||||||
QStyle::CC_TitleBar, d->hoveredSubControl);
|
QStyle::CC_TitleBar, d->hoveredSubControl);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
#ifndef QT_NO_ACTION
|
||||||
|
case QEvent::ActionAdded:
|
||||||
|
case QEvent::ActionChanged:
|
||||||
|
case QEvent::ActionRemoved:
|
||||||
|
update();
|
||||||
|
break;
|
||||||
#endif
|
#endif
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user