File tree Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Expand file tree Collapse file tree 3 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -381,7 +381,9 @@ void MainWindowPrivate::createContent()
381381 // SpecialDockArea->setAllowedAreas({ads::LeftDockWidgetArea, ads::RightDockWidgetArea}); // just for testing
382382 }
383383
384- DockManager->addDockWidget (ads::LeftDockWidgetArea, createLongTextLabelDockWidget ());
384+ DockWidget = createLongTextLabelDockWidget ();
385+ DockWidget->setFeature (ads::CDockWidget::DockWidgetFocusable, false );
386+ DockManager->addDockWidget (ads::LeftDockWidgetArea, DockWidget);
385387 auto FileSystemWidget = createFileSystemTreeDockWidget ();
386388 FileSystemWidget->setFeature (ads::CDockWidget::DockWidgetFloatable, false );
387389 appendFeaturStringToWindowTitle (FileSystemWidget);
@@ -588,7 +590,7 @@ CMainWindow::CMainWindow(QWidget *parent) :
588590
589591 // uncomment the following line to enable focus highlighting of the dock
590592 // widget that has the focus
591- // CDockManager::setConfigFlag(CDockManager::FocusHighlighting, true);
593+ CDockManager::setConfigFlag (CDockManager::FocusHighlighting, true );
592594
593595 // uncomment if you would like to enable an equal distribution of the
594596 // available size of a splitter to all contained dock widgets
Original file line number Diff line number Diff line change @@ -103,6 +103,11 @@ DockFocusControllerPrivate::DockFocusControllerPrivate(
103103// ============================================================================
104104void DockFocusControllerPrivate::updateDockWidgetFocus (CDockWidget* DockWidget)
105105{
106+ if (!DockWidget->features ().testFlag (CDockWidget::DockWidgetFocusable))
107+ {
108+ return ;
109+ }
110+
106111 CDockAreaWidget* NewFocusedDockArea = nullptr ;
107112 if (FocusedDockWidget)
108113 {
Original file line number Diff line number Diff line change @@ -152,7 +152,8 @@ private slots:
152152 DockWidgetFloatable = 0x04 ,
153153 DockWidgetDeleteOnClose = 0x08 , // /< deletes the dock widget when it is closed
154154 CustomCloseHandling = 0x10 ,
155- DefaultDockWidgetFeatures = DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable,
155+ DockWidgetFocusable = 0x20 ,
156+ DefaultDockWidgetFeatures = DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable | DockWidgetFocusable,
156157 AllDockWidgetFeatures = DefaultDockWidgetFeatures | DockWidgetDeleteOnClose | CustomCloseHandling,
157158 NoDockWidgetFeatures = 0x00
158159 };
You can’t perform that action at this time.
0 commit comments