diff --git a/src/AutoHideTab.cpp b/src/AutoHideTab.cpp index e311ff7..d926902 100644 --- a/src/AutoHideTab.cpp +++ b/src/AutoHideTab.cpp @@ -393,6 +393,8 @@ void CAutoHideTab::contextMenuEvent(QContextMenuEvent* ev) d->createAutoHideToAction(tr("Right"), SideBarRight, menu); d->createAutoHideToAction(tr("Bottom"), SideBarBottom, menu); + Action = Menu.addAction(tr("Unpin (Dock)"), this, SLOT(unpinDockWidget())); + Menu.exec(ev->globalPos()); } @@ -400,7 +402,14 @@ void CAutoHideTab::contextMenuEvent(QContextMenuEvent* ev) //============================================================================ void CAutoHideTab::setDockWidgetFloating() { - dockWidget()->setFloating(); + d->DockWidget->setFloating(); +} + + +//============================================================================ +void CAutoHideTab::unpinDockWidget() +{ + d->DockWidget->setAutoHide(false); } diff --git a/src/AutoHideTab.h b/src/AutoHideTab.h index f883b5b..8e94c45 100644 --- a/src/AutoHideTab.h +++ b/src/AutoHideTab.h @@ -145,6 +145,11 @@ public Q_SLOTS: * Set the dock widget floating, if it is floatable */ void setDockWidgetFloating(); + + /** + * Unpin and dock the auto hide widget + */ + void unpinDockWidget(); }; // class AutoHideTab } // namespace ads