Added support for make a single tab floating via double click

This commit is contained in:
Uwe Kindler
2018-09-07 13:13:44 +02:00
parent aa7b36dbd1
commit 5d380708e1
2 changed files with 22 additions and 0 deletions

View File

@@ -373,6 +373,22 @@ const QIcon& CDockWidgetTab::icon() const
{
return d->Icon;
}
//============================================================================
void CDockWidgetTab::mouseDoubleClickEvent(QMouseEvent *event)
{
// If this is the last dock area in a dock container it does not make
// sense to move it to a new floating widget and leave this one
// empty
if (!d->DockArea->dockContainer()->isFloating() || d->DockArea->count() > 1)
{
d->startFloating();
}
Super::mouseDoubleClickEvent(event);
}
} // namespace ads
//---------------------------------------------------------------------------