11# User Guide
22
3- - [ User Guide] ( #user-guide )
4- - [ Configuration Flags] ( #configuration-flags )
5- - [ Setting Configuration Flags] ( #setting-configuration-flags )
6- - [ ` ActiveTabHasCloseButton ` ] ( #activetabhasclosebutton )
7- - [ ` DockAreaHasCloseButton ` ] ( #dockareahasclosebutton )
8- - [ ` DockAreaCloseButtonClosesTab ` ] ( #dockareaclosebuttonclosestab )
9- - [ ` OpaqueSplitterResize ` ] ( #opaquesplitterresize )
10- - [ ` XmlAutoFormattingEnabled ` ] ( #xmlautoformattingenabled )
11- - [ ` XmlCompressionEnabled ` ] ( #xmlcompressionenabled )
12- - [ ` TabCloseButtonIsToolButton ` ] ( #tabclosebuttonistoolbutton )
13- - [ ` AllTabsHaveCloseButton ` ] ( #alltabshaveclosebutton )
14- - [ ` RetainTabSizeWhenCloseButtonHidden ` ] ( #retaintabsizewhenclosebuttonhidden )
15- - [ ` DragPreviewIsDynamic ` ] ( #dragpreviewisdynamic )
16- - [ ` DragPreviewShowsContentPixmap ` ] ( #dragpreviewshowscontentpixmap )
17- - [ ` DragPreviewHasWindowFrame ` ] ( #dragpreviewhaswindowframe )
18- - [ ` AlwaysShowTabs ` ] ( #alwaysshowtabs )
19- - [ ` DockAreaHasUndockButton ` ] ( #dockareahasundockbutton )
20- - [ ` DockAreaHasTabsMenuButton ` ] ( #dockareahastabsmenubutton )
21- - [ ` DockAreaHideDisabledButtons ` ] ( #dockareahidedisabledbuttons )
22- - [ ` DockAreaDynamicTabsMenuButtonVisibility ` ] ( #dockareadynamictabsmenubuttonvisibility )
23- - [ ` FloatingContainerHasWidgetTitle ` ] ( #floatingcontainerhaswidgettitle )
24- - [ ` FloatingContainerHasWidgetIcon ` ] ( #floatingcontainerhaswidgeticon )
25- - [ ` HideSingleCentralWidgetTitleBar ` ] ( #hidesinglecentralwidgettitlebar )
26- - [ ` FocusHighlighting ` ] ( #focushighlighting )
27- - [ ` EqualSplitOnInsertion ` ] ( #equalsplitoninsertion )
28- - [ ` FloatingContainerForceNativeTitleBar ` (Linux only)] ( #floatingcontainerforcenativetitlebar-linux-only )
29- - [ ` FloatingContainerForceQWidgetTitleBar ` (Linux only)] ( #floatingcontainerforceqwidgettitlebar-linux-only )
30- - [ ` MiddleMouseButtonClosesTab ` ] ( #middlemousebuttonclosestab )
31- - [ ` DisableTabTextEliding ` ] ( #disabletabtexteliding )
32- - [ ` ShowTabTextOnlyForActiveTab ` ] ( #showtabtextonlyforactivetab )
33- - [ ` DoubleClickUndocksWidget ` ] ( #doubleclickundockswidget )
34- - [ ` TabsAtBottom ` ] ( #tabsatbottom )
35- - [ Auto Hide Dock Widgets] ( #auto-hide-dock-widgets )
36- - [ Pinning Auto-Hide Widgets to a certain border] ( #pinning-auto-hide-widgets-to-a-certain-border )
37- - [ Show / Hide Auto-Hide Widgets via Mouse Over] ( #show--hide-auto-hide-widgets-via-mouse-over )
38- - [ Drag \& Drop to Auto-Hide] ( #drag--drop-to-auto-hide )
39- - [ Auto-Hide Tab Insertion Order] ( #auto-hide-tab-insertion-order )
40- - [ Auto-Hide Tab Sorting] ( #auto-hide-tab-sorting )
41- - [ Auto-Hide Drag to Float / Dock] ( #auto-hide-drag-to-float--dock )
42- - [ Auto-Hide Context Menu] ( #auto-hide-context-menu )
43- - [ Adding Auto Hide Widgets] ( #adding-auto-hide-widgets )
44- - [ Auto-Hide Configuration Flags] ( #auto-hide-configuration-flags )
45- - [ Setting Auto-Hide Flags] ( #setting-auto-hide-flags )
46- - [ ` AutoHideFeatureEnabled ` ] ( #autohidefeatureenabled )
47- - [ ` DockAreaHasAutoHideButton ` ] ( #dockareahasautohidebutton )
48- - [ ` AutoHideButtonTogglesArea ` ] ( #autohidebuttontogglesarea )
49- - [ ` AutoHideButtonCheckable ` ] ( #autohidebuttoncheckable )
50- - [ ` AutoHideSideBarsIconOnly ` ] ( #autohidesidebarsicononly )
51- - [ ` AutoHideShowOnMouseOver ` ] ( #autohideshowonmouseover )
52- - [ ` AutoHideCloseButtonCollapsesDock ` ] ( #autohideclosebuttoncollapsesdock )
53- - [ ` AutoHideHasCloseButton ` ] ( #autohidehasclosebutton )
54- - [ ` AutoHideHasMinimizeButton ` ] ( #autohidehasminimizebutton )
55- - [ ` AutoHideOpenOnDragHover ` ] ( #autohideopenondraghover )
56- - [ ` AutoHideCloseOnOutsideMouseClick ` ] ( #autohidecloseonoutsidemouseclick )
57- - [ DockWidget Feature Flags] ( #dockwidget-feature-flags )
58- - [ ` DockWidgetClosable ` ] ( #dockwidgetclosable )
59- - [ ` DockWidgetMovable ` ] ( #dockwidgetmovable )
60- - [ ` DockWidgetFloatable ` ] ( #dockwidgetfloatable )
61- - [ ` DockWidgetDeleteOnClose ` ] ( #dockwidgetdeleteonclose )
62- - [ ` CustomCloseHandling ` ] ( #customclosehandling )
63- - [ ` DockWidgetFocusable ` ] ( #dockwidgetfocusable )
64- - [ ` DockWidgetForceCloseWithArea ` ] ( #dockwidgetforceclosewitharea )
65- - [ ` NoTab ` ] ( #notab )
66- - [ ` DeleteContentOnClose ` ] ( #deletecontentonclose )
67- - [ Central Widget] ( #central-widget )
68- - [ Empty Dock Area] ( #empty-dock-area )
69- - [ Custom Close Handling] ( #custom-close-handling )
70- - [ Globally Lock Docking Features] ( #globally-lock-docking-features )
71- - [ Dock Widget Size / Minimum Size Handling] ( #dock-widget-size--minimum-size-handling )
72- - [ Styling] ( #styling )
73- - [ Disabling the Internal Style Sheet] ( #disabling-the-internal-style-sheet )
74- - [ Using ADS on Linux] ( #using-ads-on-linux )
75- - [ Supported Distributions] ( #supported-distributions )
76- - [ Requirements] ( #requirements )
77- - [ Manjaro xfce 25.0.1 and Xubuntu 24.04.2 issues] ( #manjaro-xfce-2501-and-xubuntu-24042-issues )
78- - [ OpenGl + ADS] ( #opengl--ads )
3+ - [ Configuration Flags] ( #configuration-flags )
4+ - [ Setting Configuration Flags] ( #setting-configuration-flags )
5+ - [ ` ActiveTabHasCloseButton ` ] ( #activetabhasclosebutton )
6+ - [ ` DockAreaHasCloseButton ` ] ( #dockareahasclosebutton )
7+ - [ ` DockAreaCloseButtonClosesTab ` ] ( #dockareaclosebuttonclosestab )
8+ - [ ` OpaqueSplitterResize ` ] ( #opaquesplitterresize )
9+ - [ ` XmlAutoFormattingEnabled ` ] ( #xmlautoformattingenabled )
10+ - [ ` XmlCompressionEnabled ` ] ( #xmlcompressionenabled )
11+ - [ ` TabCloseButtonIsToolButton ` ] ( #tabclosebuttonistoolbutton )
12+ - [ ` AllTabsHaveCloseButton ` ] ( #alltabshaveclosebutton )
13+ - [ ` RetainTabSizeWhenCloseButtonHidden ` ] ( #retaintabsizewhenclosebuttonhidden )
14+ - [ ` DragPreviewIsDynamic ` ] ( #dragpreviewisdynamic )
15+ - [ ` DragPreviewShowsContentPixmap ` ] ( #dragpreviewshowscontentpixmap )
16+ - [ ` DragPreviewHasWindowFrame ` ] ( #dragpreviewhaswindowframe )
17+ - [ ` AlwaysShowTabs ` ] ( #alwaysshowtabs )
18+ - [ ` DockAreaHasUndockButton ` ] ( #dockareahasundockbutton )
19+ - [ ` DockAreaHasTabsMenuButton ` ] ( #dockareahastabsmenubutton )
20+ - [ ` DockAreaHideDisabledButtons ` ] ( #dockareahidedisabledbuttons )
21+ - [ ` DockAreaDynamicTabsMenuButtonVisibility ` ] ( #dockareadynamictabsmenubuttonvisibility )
22+ - [ ` FloatingContainerHasWidgetTitle ` ] ( #floatingcontainerhaswidgettitle )
23+ - [ ` FloatingContainerHasWidgetIcon ` ] ( #floatingcontainerhaswidgeticon )
24+ - [ ` HideSingleCentralWidgetTitleBar ` ] ( #hidesinglecentralwidgettitlebar )
25+ - [ ` FocusHighlighting ` ] ( #focushighlighting )
26+ - [ ` EqualSplitOnInsertion ` ] ( #equalsplitoninsertion )
27+ - [ ` FloatingContainerForceNativeTitleBar ` (Linux only)] ( #floatingcontainerforcenativetitlebar-linux-only )
28+ - [ ` FloatingContainerForceQWidgetTitleBar ` (Linux only)] ( #floatingcontainerforceqwidgettitlebar-linux-only )
29+ - [ ` MiddleMouseButtonClosesTab ` ] ( #middlemousebuttonclosestab )
30+ - [ ` DisableTabTextEliding ` ] ( #disabletabtexteliding )
31+ - [ ` ShowTabTextOnlyForActiveTab ` ] ( #showtabtextonlyforactivetab )
32+ - [ ` DoubleClickUndocksWidget ` ] ( #doubleclickundockswidget )
33+ - [ ` TabsAtBottom ` ] ( #tabsatbottom )
34+ - [ ` UseNativeWindows ` ] ( #usenativewindows )
35+ - [ ` DisableStyleheet ` ] ( #disablestyleheet )
36+ - [ Auto Hide Dock Widgets] ( #auto-hide-dock-widgets )
37+ - [ Pinning Auto-Hide Widgets to a certain border] ( #pinning-auto-hide-widgets-to-a-certain-border )
38+ - [ Show / Hide Auto-Hide Widgets via Mouse Over] ( #show--hide-auto-hide-widgets-via-mouse-over )
39+ - [ Drag \& Drop to Auto-Hide] ( #drag--drop-to-auto-hide )
40+ - [ Auto-Hide Tab Insertion Order] ( #auto-hide-tab-insertion-order )
41+ - [ Auto-Hide Tab Sorting] ( #auto-hide-tab-sorting )
42+ - [ Auto-Hide Drag to Float / Dock] ( #auto-hide-drag-to-float--dock )
43+ - [ Auto-Hide Context Menu] ( #auto-hide-context-menu )
44+ - [ Adding Auto Hide Widgets] ( #adding-auto-hide-widgets )
45+ - [ Preferred Aut Hide Sidebar Location] ( #preferred-aut-hide-sidebar-location )
46+ - [ API] ( #api )
47+ - [ Auto-Hide Configuration Flags] ( #auto-hide-configuration-flags )
48+ - [ Setting Auto-Hide Flags] ( #setting-auto-hide-flags )
49+ - [ ` AutoHideFeatureEnabled ` ] ( #autohidefeatureenabled )
50+ - [ ` DockAreaHasAutoHideButton ` ] ( #dockareahasautohidebutton )
51+ - [ ` AutoHideButtonTogglesArea ` ] ( #autohidebuttontogglesarea )
52+ - [ ` AutoHideButtonCheckable ` ] ( #autohidebuttoncheckable )
53+ - [ ` AutoHideSideBarsIconOnly ` ] ( #autohidesidebarsicononly )
54+ - [ ` AutoHideShowOnMouseOver ` ] ( #autohideshowonmouseover )
55+ - [ ` AutoHideCloseButtonCollapsesDock ` ] ( #autohideclosebuttoncollapsesdock )
56+ - [ ` AutoHideHasCloseButton ` ] ( #autohidehasclosebutton )
57+ - [ ` AutoHideHasMinimizeButton ` ] ( #autohidehasminimizebutton )
58+ - [ ` AutoHideOpenOnDragHover ` ] ( #autohideopenondraghover )
59+ - [ ` AutoHideCloseOnOutsideMouseClick ` ] ( #autohidecloseonoutsidemouseclick )
60+ - [ DockWidget Feature Flags] ( #dockwidget-feature-flags )
61+ - [ ` DockWidgetClosable ` ] ( #dockwidgetclosable )
62+ - [ ` DockWidgetMovable ` ] ( #dockwidgetmovable )
63+ - [ ` DockWidgetFloatable ` ] ( #dockwidgetfloatable )
64+ - [ ` DockWidgetDeleteOnClose ` ] ( #dockwidgetdeleteonclose )
65+ - [ ` CustomCloseHandling ` ] ( #customclosehandling )
66+ - [ ` DockWidgetFocusable ` ] ( #dockwidgetfocusable )
67+ - [ ` DockWidgetForceCloseWithArea ` ] ( #dockwidgetforceclosewitharea )
68+ - [ ` NoTab ` ] ( #notab )
69+ - [ ` DeleteContentOnClose ` ] ( #deletecontentonclose )
70+ - [ Central Widget] ( #central-widget )
71+ - [ Empty Dock Area] ( #empty-dock-area )
72+ - [ Custom Close Handling] ( #custom-close-handling )
73+ - [ Globally Lock Docking Features] ( #globally-lock-docking-features )
74+ - [ Dock Widget Size / Minimum Size Handling] ( #dock-widget-size--minimum-size-handling )
75+ - [ Styling] ( #styling )
76+ - [ Disabling the Internal Style Sheet] ( #disabling-the-internal-style-sheet )
77+ - [ Using ADS on Linux] ( #using-ads-on-linux )
78+ - [ Supported Distributions] ( #supported-distributions )
79+ - [ Requirements] ( #requirements )
80+ - [ Manjaro xfce 25.0.1 and Xubuntu 24.04.2 issues] ( #manjaro-xfce-2501-and-xubuntu-24042-issues )
81+ - [ OpenGl + ADS] ( #opengl--ads )
7982
8083## Configuration Flags
8184
@@ -518,6 +521,16 @@ If the flag is set, tabs will be shown at the bottom instead of in the title bar
518521
519522
520523
524+ ### `UseNativeWindows`
525+
526+ If the flag is set, windows for the dock and area widgets will be native on Windows OS.
527+ It is disabled by default.
528+
529+ ### `DisableStyleheet`
530+
531+ If the flag is set, the dock manager will not apply the default stylesheet. You can
532+ enable this flag, if you want to use your own stylesheet.
533+
521534## Auto Hide Dock Widgets
522535
523536The Advanced Docking System supports "Auto-Hide" functionality for **all**
@@ -617,6 +630,26 @@ CDockWidget* TableDockWidget = new CDockWidget("Table 1");
617630DockManager->addAutoHideDockWidget(SideBarLeft, TableDockWidget);
618631```
619632
633+ ### Preferred Aut Hide Sidebar Location
634+
635+ By default, docking a widget to auto-hide determines the target sidebar based on the widget's current geometry. While this works well for most layouts, applications with fixed panel arrangements may prefer explicit control over the sidebar placement.
636+
637+ Use ` setPreferredAutoHideSideBarLocation() ` to specify the preferred auto-hide sidebar for a dock widget:
638+
639+ ``` c++
640+ dockWidget->setPreferredAutoHideSideBarLocation (SideBarLeft);
641+ ```
642+
643+ When a preferred location is set, the widget is always pinned to the specified sidebar instead of using geometry-based detection. The default value (`SideBarNone`) preserves the existing behavior.
644+
645+ When restoring (unpinning) a widget, the docking system also attempts to merge it into an existing dock area containing widgets with the same preferred sidebar location, avoiding unnecessary split areas and keeping related widgets grouped as tabs.
646+
647+ **API**
648+
649+ ```c++
650+ void setPreferredAutoHideSideBarLocation(SideBarLocation location); SideBarLocation preferredAutoHideSideBarLocation() const;
651+ ```
652+
620653See ` autohide ` example or the demo application to learn how it works.
621654
622655## Auto-Hide Configuration Flags
@@ -966,6 +999,12 @@ just call the function for settings the stylesheet with an empty string.
966999DockManager->setStyleSheet ("");
9671000```
9681001
1002+ or you can use the configuration flag `DisableStyleheet` to disable the internal stylesheet.
1003+
1004+ ```c++
1005+ CDockManager::setConfigFlag(CDockManager::DisableStyleheet, true);
1006+ ```
1007+
9691008## Using ADS on Linux
9701009
9711010### Supported Distributions
@@ -983,7 +1022,7 @@ the library switches to `QWidget` based title bars.
9831022There are some requirements for the Linux distribution that have to be met:
9841023
9851024- an X server that supports ARGB visuals and a compositing window manager. This is required to display the translucent dock overlays ([ https://doc.qt.io/qt-5/qwidget.html#creating-translucent-windows ] ( https://doc.qt.io/qt-5/qwidget.html#creating-translucent-windows ) ). If your Linux distribution does not support this, or if you disable this feature, you will very likely see issue [ #95 ] ( https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/95 ) .
986- - Wayland is not properly supported by Qt yet . If you use Wayland, then you should set the session type to x11: `XDG_SESSION_TYPE=x11 ./AdvancedDockingSystemDemo`. You will find more details about this in issue [#288](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/288).
1025+ - With ADS version v5.0.0 Wayland is supported . If you have problems with Wayland, then you should set the session type to x11: ` XDG_SESSION_TYPE=x11 ./AdvancedDockingSystemDemo ` . You will find more details about this in issue [ #288 ] ( https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/288 ) .
9871026
9881027Screenshot Kubuntu:
9891028![ Advanced Docking on Kubuntu Linux] ( linux_kubuntu_1804.png )
0 commit comments