mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-24 23:31:32 +08:00
Added documentation for emptx dock area feature
This commit is contained in:
parent
a614e3cc3d
commit
3f69fedd1f
11
README.md
11
README.md
@ -15,10 +15,13 @@ integrated development environments (IDEs) such as Visual Studio.
|
||||
|
||||
## New and Noteworthy
|
||||
|
||||
The [release 3.7.0](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/tag/3.7.0)
|
||||
adds support for Qt6.
|
||||
The [release 3.7](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/tag/3.7.0)
|
||||
adds the following features:
|
||||
|
||||
The [release 3.6.0](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/tag/3.6.0)
|
||||
- support for **Qt6.**
|
||||
- support for [empty dock area](doc/user-guide.md#empty-dock-area)
|
||||
|
||||
The [release 3.6](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/tag/3.6.0)
|
||||
adds some nice new features:
|
||||
|
||||
- support for [central widget](doc/user-guide.md#central-widget) concept
|
||||
@ -32,7 +35,7 @@ adds some nice new features:
|
||||
Both features are contributions from ADS users. Read the [documentation](doc/user-guide.md)
|
||||
to learn more about both new features.
|
||||
|
||||
The [release 3.5.0](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/tag/3.5.0)
|
||||
The [release 3.5](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/releases/tag/3.5.0)
|
||||
adds the new [focus highlighting](doc/user-guide.md#focushighlighting) feature.
|
||||
This optional feature enables highlighting of the focused dock widget like you
|
||||
know it from Visual Studio.
|
||||
|
@ -28,6 +28,7 @@
|
||||
- [`FloatingContainerForceNativeTitleBar` (Linux only)](#floatingcontainerforcenativetitlebar-linux-only)
|
||||
- [`FloatingContainerForceQWidgetTitleBar` (Linux only)](#floatingcontainerforceqwidgettitlebar-linux-only)
|
||||
- [Central Widget](#central-widget)
|
||||
- [Empty Dock Area](#empty-dock-area)
|
||||
- [Custom Close Handling](#custom-close-handling)
|
||||
- [Styling](#styling)
|
||||
- [Disabling the Internal Style Sheet](#disabling-the-internal-style-sheet)
|
||||
@ -500,6 +501,33 @@ See the `centralwidget` example to learn how it works.
|
||||
> are already other dock widgets registered. So `setCentralWidget` should be
|
||||
> the first function that you call when adding dock widgets.
|
||||
|
||||
## Empty Dock Area
|
||||
|
||||
Some applications require a fixed DockArea that is always visible, even if it
|
||||
does not contain any DockWidgets. I.e. the DockArea is in this case a kind
|
||||
of central widget that is always visible (see this
|
||||
[issue](https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System/issues/199)).
|
||||
|
||||
Since version 3.7.1 the advanced docking system supports this feature. The
|
||||
`emptydockarea` example shows how this can be implemented with the library. You
|
||||
just need to create a dock widget and set the feature flag `CDockWidget::NoTab`.
|
||||
This permanently hides the tab widget of this area and removes it from the tab
|
||||
menu. For this special dock widget you should also disable all other features
|
||||
(movable, closable and floatable) to prevent closing and moving of this widget.
|
||||
If you use the `CDockManager::setCentralWidget` function like in the example
|
||||
code below, the you do not need to disable these features because this is done
|
||||
in the `setCentralWidget` function.
|
||||
|
||||
```c++
|
||||
QLabel* label = new QLabel();
|
||||
label->setText("This is a DockArea which is always visible, even if it does not contain any DockWidgets.");
|
||||
label->setAlignment(Qt::AlignCenter);
|
||||
CDockWidget* CentralDockWidget = new CDockWidget("CentralWidget");
|
||||
CentralDockWidget->setWidget(label);
|
||||
auto* CentralDockArea = DockManager->setCentralWidget(CentralDockWidget);
|
||||
CentralDockWidget->setFeature(ads::CDockWidget::NoTab, true);
|
||||
```
|
||||
|
||||
## Custom Close Handling
|
||||
|
||||
Normally clicking the close button of a dock widget will just hide the widget and the user can show it again using the `toggleView()` action of the dock widget. This is meant for user interfaces with a static amount of widgets. But the advanced docking system also supports dynamic dock widgets that will get deleted on close. If you set the dock widget flag `DockWidgetDeleteOnClose` for a certain dock widget, then it will be deleted as soon as you close this dock widget. This enables the implementation of user interfaces with dynamically created editors, like in word processing applications or source code development tools.
|
||||
|
Loading…
Reference in New Issue
Block a user