Skip to content

Commit 1049576

Browse files
author
Eric Wong
authored
Update DockAreaTabBar.cpp
Sometimes the synchronous calculation of the rectangular area fails
1 parent 0bfee09 commit 1049576

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/DockAreaTabBar.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <QBoxLayout>
3737
#include <QApplication>
3838
#include <QtGlobal>
39+
#include <QTimer>
3940

4041
#include "FloatingDockContainer.h"
4142
#include "DockAreaWidget.h"
@@ -107,7 +108,9 @@ void DockAreaTabBarPrivate::updateTabs()
107108
{
108109
TabWidget->show();
109110
TabWidget->setActiveTab(true);
110-
_this->ensureWidgetVisible(TabWidget);
111+
QTimer::singleShot(0, [&, TabWidget]{
112+
_this->ensureWidgetVisible(TabWidget);
113+
});
111114
}
112115
else
113116
{

0 commit comments

Comments
 (0)