From 1049576349afd9037f45eac245f2f5663b884228 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 8 Jun 2023 09:13:41 +0800 Subject: [PATCH] Update DockAreaTabBar.cpp Sometimes the synchronous calculation of the rectangular area fails --- src/DockAreaTabBar.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/DockAreaTabBar.cpp b/src/DockAreaTabBar.cpp index 1b26435..898fc48 100644 --- a/src/DockAreaTabBar.cpp +++ b/src/DockAreaTabBar.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include "FloatingDockContainer.h" #include "DockAreaWidget.h" @@ -107,7 +108,9 @@ void DockAreaTabBarPrivate::updateTabs() { TabWidget->show(); TabWidget->setActiveTab(true); - _this->ensureWidgetVisible(TabWidget); + QTimer::singleShot(0, [&, TabWidget]{ + _this->ensureWidgetVisible(TabWidget); + }); } else {