1
0
mirror of https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git synced 2025-04-01 02:42:39 +08:00

Ensure that TabWidget was not deleted by using it as context object

This commit is contained in:
Marcus Venturi 2024-03-12 17:17:58 +01:00
parent 08da925fde
commit 3618e416c2

View File

@ -111,8 +111,9 @@ void DockAreaTabBarPrivate::updateTabs()
// Sometimes the synchronous calculation of the rectangular area fails // Sometimes the synchronous calculation of the rectangular area fails
// Therefore we use QTimer::singleShot here to execute the call // Therefore we use QTimer::singleShot here to execute the call
// within the event loop - see #520 // within the event loop - see #520
QTimer::singleShot(0, [&, TabWidget]{ QTimer::singleShot(0, TabWidget, [&, TabWidget]
_this->ensureWidgetVisible(TabWidget); {
_this->ensureWidgetVisible(TabWidget);
}); });
} }
else else