Ensure that TabWidget was not deleted by using it as context object (#612)

Co-authored-by: Marcus Venturi <marcus.venturi@visu-it.de>
This commit is contained in:
UnlimitedStack 2024-03-16 01:23:42 +01:00 committed by GitHub
parent 08da925fde
commit 8da0713bf0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -111,7 +111,8 @@ 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);
}); });
} }