Add signal by widget for attach/reattach.

This commit is contained in:
Ernie Pasveer
2024-09-02 16:05:27 -05:00
parent eaafa6bd80
commit 1c8f368bc5
2 changed files with 7 additions and 0 deletions
+5
View File
@@ -76,6 +76,7 @@ void QDetachTabWidget::detachTab (int tabIndex, Qt::WindowState windowState) {
// Notify listeners the tab was detached.
emit tabDetached(tabIndex);
emit tabDetached(w);
}
void QDetachTabWidget::reattachTab (int tabIndex, Qt::WindowState windowState) {
@@ -109,11 +110,15 @@ void QDetachTabWidget::reattachTab (int tabIndex, Qt::WindowState windowState) {
// Insert the real tab in the same position.
insertTab(tabIndex, it->_widget, it->_title);
// Save the real tab's widget before we delete the entry.
w = it->_widget;
// Delete the entry from the tab cache.
_tabInfo.erase(it);
// Notify listeners the tab was reattached.
emit tabReattached(tabIndex);
emit tabReattached(w);
}
void QDetachTabWidget::closeEvent (QCloseEvent* e) {