Properly implemented handling of DockWidget flag DockWidgetIsMovable for NonOpaque undocking - creating the drag preview is allowed even if the DockWidget is not floatable

This commit is contained in:
Uwe Kindler
2020-02-16 14:37:14 +01:00
parent 2c15d5dacd
commit d4a18003d9
5 changed files with 36 additions and 17 deletions
+4 -2
View File
@@ -331,6 +331,8 @@ void MainWindowPrivate::createContent()
auto ToolBar = FileSystemWidget->createDefaultToolBar();
ToolBar->addAction(ui.actionSaveState);
ToolBar->addAction(ui.actionRestoreState);
FileSystemWidget->setFeature(ads::CDockWidget::DockWidgetFloatable, false);
appendFeaturStringToWindowTitle(FileSystemWidget);
DockManager->addDockWidget(ads::BottomDockWidgetArea, FileSystemWidget);
FileSystemWidget = createFileSystemTreeDockWidget(ViewMenu);
@@ -484,9 +486,9 @@ CMainWindow::CMainWindow(QWidget *parent) :
// a QToolButton instead of a QPushButton
// CDockManager::setConfigFlags(CDockManager::configFlags() | CDockManager::TabCloseButtonIsToolButton);
// comment the following line if you want to use opaque undocking and
// uncomment the following line if you want to use opaque undocking and
// opaque splitter resizing
CDockManager::setConfigFlags(CDockManager::DefaultNonOpaqueConfig);
// CDockManager::setConfigFlags(CDockManager::DefaultOpaqueConfig);
// uncomment the following line if you want a fixed tab width that does
// not change if the visibility of the close button changes