We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba20bea commit c60b323Copy full SHA for c60b323
src/widgets/SplitTabWidget.cpp
@@ -449,8 +449,12 @@ void SplitTabWidget::moveTabToNewSplit(QWidget *widget) {
449
auto oldTab = qobject_cast<QTabWidget *>(widget->parentWidget()->parentWidget());
450
auto index = oldTab->indexOf(widget);
451
auto text = oldTab->tabText(index);
452
- currentTabWidget->addTab(widget, text);
453
- oldTab->removeTab(index);
+ auto tooltip = oldTab->tabToolTip(index);
+
454
+ // The widget is automatically removed from oldTab when reparented
455
+ auto newIndex = currentTabWidget->addTab(widget, text);
456
+ currentTabWidget->setTabToolTip(newIndex, tooltip);
457
+ currentTabWidget->setCurrentIndex(newIndex);
458
widget->setFocus();
459
}
460
0 commit comments