fix QDockWidget

This commit is contained in:
Le Tan 2022-01-08 16:01:05 +08:00
parent a5671e20e5
commit 09dba18994
2 changed files with 8 additions and 1 deletions

View File

@ -6,7 +6,7 @@
"version" : "3.11.0"
},
"core" : {
"theme" : "pure",
"theme" : "moonlight",
"locale" : "",
"shortcuts" : {
"FullScreen" : "F11",

View File

@ -243,6 +243,8 @@ void DockWidgetHelper::activateDock(DockIndex p_dockIndex)
void DockWidgetHelper::activateDock(QDockWidget *p_dock)
{
bool needUpdateTabBar = !p_dock->isVisible();
p_dock->show();
Q_FOREACH(QTabBar* tabBar, m_mainWindow->findChildren<QTabBar*>(QString(), Qt::FindDirectChildrenOnly)) {
bool found = false;
@ -258,7 +260,12 @@ void DockWidgetHelper::activateDock(QDockWidget *p_dock)
break;
}
}
p_dock->setFocus();
if (needUpdateTabBar) {
updateDockWidgetTabBar();
}
}
const QVector<QDockWidget *> &DockWidgetHelper::getDocks() const