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()
381
381
// SpecialDockArea->setAllowedAreas({ads::LeftDockWidgetArea, ads::RightDockWidgetArea}); // just for testing
382
382
}
383
383
384
- DockManager->addDockWidget (ads::LeftDockWidgetArea, createLongTextLabelDockWidget ());
384
+ DockWidget = createLongTextLabelDockWidget ();
385
+ DockWidget->setFeature (ads::CDockWidget::DockWidgetFocusable, false );
386
+ DockManager->addDockWidget (ads::LeftDockWidgetArea, DockWidget);
385
387
auto FileSystemWidget = createFileSystemTreeDockWidget ();
386
388
FileSystemWidget->setFeature (ads::CDockWidget::DockWidgetFloatable, false );
387
389
appendFeaturStringToWindowTitle (FileSystemWidget);
@@ -588,7 +590,7 @@ CMainWindow::CMainWindow(QWidget *parent) :
588
590
589
591
// uncomment the following line to enable focus highlighting of the dock
590
592
// widget that has the focus
591
- // CDockManager::setConfigFlag(CDockManager::FocusHighlighting, true);
593
+ CDockManager::setConfigFlag (CDockManager::FocusHighlighting, true );
592
594
593
595
// uncomment if you would like to enable an equal distribution of the
594
596
// 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(
103
103
// ============================================================================
104
104
void DockFocusControllerPrivate::updateDockWidgetFocus (CDockWidget* DockWidget)
105
105
{
106
+ if (!DockWidget->features ().testFlag (CDockWidget::DockWidgetFocusable))
107
+ {
108
+ return ;
109
+ }
110
+
106
111
CDockAreaWidget* NewFocusedDockArea = nullptr ;
107
112
if (FocusedDockWidget)
108
113
{
Original file line number Diff line number Diff line change @@ -152,7 +152,8 @@ private slots:
152
152
DockWidgetFloatable = 0x04 ,
153
153
DockWidgetDeleteOnClose = 0x08 , // /< deletes the dock widget when it is closed
154
154
CustomCloseHandling = 0x10 ,
155
- DefaultDockWidgetFeatures = DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable,
155
+ DockWidgetFocusable = 0x20 ,
156
+ DefaultDockWidgetFeatures = DockWidgetClosable | DockWidgetMovable | DockWidgetFloatable | DockWidgetFocusable,
156
157
AllDockWidgetFeatures = DefaultDockWidgetFeatures | DockWidgetDeleteOnClose | CustomCloseHandling,
157
158
NoDockWidgetFeatures = 0x00
158
159
};
You can’t perform that action at this time.
0 commit comments