An advanced docking system for Qt
KDDockWidgets is a framework for custom-tailored docking systems in Qt. It includes the following features:
- It provides advanced docking that QDockWidgets doesn’t support
- Supports native window resize on Windows (allowing for Aero-snap even with custom title bar decorations)
- Provides arrow drop indicators for finer drop precision
- Allows for customizable, user created drop indicator types
- Lets you nest dock widgets in a floating window and docking that group back to main window
- Allows for docking to any main window, not only to the parent main window
- Permits docking to center of main window, or simply removing the concept of “central widget”
- Main window supports detachable tabs in center widget
- Allows users to detach arbitrary tabs from a tab bar into a dock area
- Supports more than 1 main window
- Has support for affinities, making some dock widgets only dockable on certain main windows
- Allows hiding TitleBar to just show tabs. Allows dragging via the tab bar.
- Exposes inner helper widgets so the user can customize them or provide their own to customize tab widgets, title bars, window frames and widget separators
- The layouting engine honors min/max size constraints and some size policies
- Supports PySide2 bindings
- Clean codebase
- Does not mix GUI with state with logic with animations
- Great test coverage, even the gui and DnD operations are tested. 200 tests currently.
- Fuzzer for doing random testing and finding bugs
- Supports lazy separator resize
- You can reorder tabs with the mouse
- Supports partial layout save/restore, affecting only a chosen sub-set
- Allows double clicking on title bar to maximize
- Allows double clicking on separator to distribute equally
- Shows close button on tabs
- Allows you to make a dock widget non-closable and/or non-dockable
- Provides an optional maximize button on the title bar
- FloatingWindows can be utility windows or full native
Throughout the years KDAB has contributed to and funded QDockWidget development. Contributing sometimes posed difficulties: changes invariably took many days to implement, and fixing regressions needed more time. In its existing state, QDockWidget is prone to bugs. It mixes GUI code with logic/state in a spaghetti manner, making it hard to modify. Its bugginess and complexity has multiplied over time by efforts to deal with the ongoing nuances of 3 platforms.
KDDockWidgets was created by KDAB’s senior software engineer, Sergio Martins. It was born from the frustration he experienced from working with QDockWidget on projects that needed extensive customization. (Read his blog about it). Specific requests increasingly made it clear that a better docking framework was needed.
The immediate differences you can see above are the very precise docking indicators plus the total freedom of docking areas.
Here’s a comprehensive list:
- You can now dock into the center or simply remove the concept of “central widget”
- You can have tabs in the center
- Nesting dock widgets in a floating window and docking that group back to main window now works
- You can dock to any main window. The main window is no longer the “owner” of a dock widget
- The GUI code is separated from logic, so we can easily provide a QtQuick backend
- Inner helper widgets are exposed, so the user can customize them or provide his own
- Extensively tested: KDDockWidgets has undergone 200+ tests, including some which send fake mouse events to test GUI DnD operations, as well as a fuzzer to help find bugs
- Allows the user to implement different types of docking indicators
- Experimental QtQuick support
Moreover, KDDockWidgets is a framework, so you can easily override interfaces to provide custom behavior and appearance.
We now have a WASM Demo which you can run directly on your browser. It’s very similar to what you’d get on the desktop, except for the docking indicators and performance (depending on browser).
Try the Online WebAssembly Demo
There is also a full KDDockWidgets demo, showcasing its features, in the KDDockWidgets Github repository. More details here…
KDDockWidgets is available as commercial and open source. The Open Source version (GPLv2 & GPLv3) can be downloaded from: https://github.com/KDAB/KDDockWidgets
For commercial licensing regarding inclusion in proprietary software and/or for tailored support options contact us and ask for a 30-day free trial license.
View the Product-based Development and Distribution License Agreement…
View KDDockWidgets documentation here…