Skip to content

Commit ee6ddfa

Browse files
Documented DockWidget feature flags
1 parent 720b5f0 commit ee6ddfa

File tree

2 files changed

+74
-0
lines changed

2 files changed

+74
-0
lines changed
257 KB
Loading

doc/user-guide.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@
2727
- [`EqualSplitOnInsertion`](#equalsplitoninsertion)
2828
- [`FloatingContainerForceNativeTitleBar` (Linux only)](#floatingcontainerforcenativetitlebar-linux-only)
2929
- [`FloatingContainerForceQWidgetTitleBar` (Linux only)](#floatingcontainerforceqwidgettitlebar-linux-only)
30+
- [`MiddleMouseButtonClosesTab`](#middlemousebuttonclosestab)
31+
- [DockWidget Feature Flags](#dockwidget-feature-flags)
32+
- [`DockWidgetClosable`](#dockwidgetclosable)
33+
- [`DockWidgetMovable`](#dockwidgetmovable)
34+
- [`DockWidgetFloatable`](#dockwidgetfloatable)
35+
- [`DockWidgetDeleteOnClose`](#dockwidgetdeleteonclose)
36+
- [`CustomCloseHandling`](#customclosehandling)
37+
- [`DockWidgetFocusable`](#dockwidgetfocusable)
38+
- [`DockWidgetForceCloseWithArea`](#dockwidgetforceclosewitharea)
39+
- [`NoTab`](#notab)
40+
- [`DeleteContentOnClose`](#deletecontentonclose)
3041
- [Central Widget](#central-widget)
3142
- [Empty Dock Area](#empty-dock-area)
3243
- [Custom Close Handling](#custom-close-handling)
@@ -464,6 +475,69 @@ If you would like to overwrite autodetection, then you can activate this flag
464475
to force QWidget based title bars. You can overwrite autodetection and this
465476
flag, if you set the environment variable `ADS_UseNativeTitle` to 0 or 1.
466477
478+
### `MiddleMouseButtonClosesTab`
479+
480+
If the flag is set, the user can use the mouse middle button to close the tab
481+
under the mouse. So you do not need to exactly hit the tab close button to
482+
close tab. Just click with the middle mouse button on a tab like this is
483+
possible in various web browsers.
484+
485+
![MiddleMouseButtonClosesTab true](cfg_flag_MiddleMouseButtonClosesTab.gif)
486+
487+
## DockWidget Feature Flags
488+
489+
### `DockWidgetClosable`
490+
491+
If set, the dock widget will have a close button.
492+
493+
### `DockWidgetMovable`
494+
495+
If a dock widget is movable, then it and can be moved to a new position in the
496+
current dock container. Disable this flag to prevent moving of a dock widget
497+
via mouse. If the `OpaqueUndocking` configuration flag is set, then dock widgets
498+
are immediately undocked into floating widgets. That means, moving is only
499+
possible in this case, if the dock widget is also floatable (feature flag
500+
`DockWidgetFloatable` is set).
501+
502+
### `DockWidgetFloatable`
503+
504+
If set, a dock widget can be dragged into a floating window.
505+
506+
### `DockWidgetDeleteOnClose`
507+
508+
Deletes the dock widget and its content when it is closed.
509+
510+
### `CustomCloseHandling`
511+
512+
Clicking the close button will not close the dock widget but emits the
513+
`closeRequested()` signal instead. This allows the application to implement
514+
a custom close handling.
515+
516+
### `DockWidgetFocusable`
517+
518+
If this is enabled, a dock widget can get focus highlighting.
519+
520+
### `DockWidgetForceCloseWithArea`
521+
522+
A dock widget will be closed when the dock area hosting it is closed. If the
523+
`DockWidgetDeleteOnClose` feature is enabled for a dock widget, then it will
524+
be deleted, if the user clicks the close button of this dock widget. If the
525+
user clicks the close button of the dock area that contains this widget,
526+
then only the visibility of the dock widget is toggled. If this feature flag
527+
is set, the closing the dock area also closes the dock widget. That means, if
528+
the dock widget feature `DockWidgetDeleteOnClose` is set for the dock widgets
529+
in a dock area, then all dock widgets will be deleted if the dock area is closed.
530+
531+
### `NoTab`
532+
533+
A dock widget tab will never be shown if this flag is set.
534+
535+
### `DeleteContentOnClose`
536+
537+
Deletes only the contained widget on close, keeping the dock widget intact and
538+
in place. Attempts to rebuild the contents widget on show if there is a widget
539+
factory set. See issue #365 for more details.
540+
467541
## Central Widget
468542
469543
The Advanced Docking System has been developed to overcome the limitations of

0 commit comments

Comments
 (0)