Skip to content

KDDockWidgets 1.2.0 released Wayland, WASM, Qt6

KDAB has released KDDockWidgets 1.2.0.

In this version we added support for two platforms, Wayland and WASM. Additionally, Qt 6.0 is now supported.

Update: 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

Wayland

The big highlight of KDDockWidgets 1.2.0 is Wayland.

This was needed urgently, as there’s no other docking framework on this platform (to my knowledge). Linux distros are gradually abandoning X11 in favor of Wayland, breaking many developer tools in the process.

The implementation was challenging, as we needed to work around wayland protocol limitations (or rather security features), which substantially restricted the client windows. For example, it’s very hard for a client to position its window at a certain coordinate, or to know where other windows are, or to know its Z-order and detect the drop areas bellow it.

See README-Wayland for details on the concessions we had to make.

Another hurdle was that it wasn’t very hard to crash the compositor or the Qt wayland client QPA itself, so we needed a few more workarounds since those aren’t fixed in KDE and Qt.

WASM / WebAssembly

KDockWidgets can now run on a browser, via Qt for WebAssembly.

It was almost running out of the box, just had to initialize the qrc resources.

One snag, however, is that translucent windows don’t work on WASM; they appear black. Therefore, the classical indicators are disabled and you get the segmented indicators by default instead, as these don’t use translucency. I’m not sure if this is a bug in Qt, or a WASM limitation.

Another weird thing is that it’s very snappy and fluid when running on my phone, while it’s a bit sluggish when testing on my laptop.

See README-WASM for setup instructions.

Qt 6

The port was straightforward. When I ran all 200 tests, I was surprised; they still passed without needing workarounds.

The only major work was getting rid of QStateMachine. This class is now in the qtscxml module, not yet ported to Qt 6. So, I just rewrote the parts that depended on it.

Let me know if you spot any bugs; I haven’t tested it extensively.

KDDockWidgets is commercial and open source (GPLv2 & GPLv3).

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.

If you missed the blog about the previous version of KDDockWidgets, v1.1, you can read that here.

Visit the KDDockWidgets GitHub page to get the update: https://github.com/KDAB/KDDockWidgets/releases/tag/v1.2.0.

You can find the source code for the KDDockWidgets 1.2.0 release on GitHub at: https://github.com/KDAB/KDDockWidgets

Tarballs and zipballs for 1.2.0 are here: https://github.com/KDAB/KDDockWidgets/releases

Prebuilt packages for some popular Linux distributions are here: https://build.opensuse.org/project/repositories/isv:KDAB

About KDAB

If you like this blog and want to read similar articles, consider subscribing via our RSS feed.

Subscribe to KDAB TV for similar informative short video content.

KDAB provides market leading software consulting and development services and training in Qt, C++ and 3D/OpenGL. Contact us.

FacebookTwitterLinkedInEmail
Leave a Reply

Your email address will not be published. Required fields are marked *