This 3-part blog series shows in detail how to get up to speed with a Qt project using Visual Studio Code. Part 3 further integrates Qt into VS Code with syntax highlighting, Qt Creator quick switch and more…
Technical Get the RSS Feed
Fun and Scary Code from Qt and KDE
These are some really cool or obfuscated code snippets for your amusement. We didn’t want to rate them, so the order doesn’t mean anything at all 🙂 Just to make sure that there’s no misunderstanding: This code really is/was in the Qt or KDE repositories. From Kivio, main.cpp From Qt 2.2.1 (src/canvas/qcanvas.cpp) Writing code that […]
Wayland on Windows Run a Wayland Compositor Directly in Your Windows Machine
Qt provides both a Wayland platform to run Qt applications as Wayland clients in a Wayland compositor and a library to build that, but only on Linux. The WSL subsystem makes that possible on Windows.
Auto-Accepting in QSortFilterProxyModel Since Qt 6.0, QSortFilterProxyModel Can Auto-accept Child Rows of Rows Matching the Filter.
In Qt 5.10, we added support for recursive filtering in QSortFilterProxyModel, which means keeping all parents of items matching the filter. One of the comments in the blog post about that feature was “Sometimes, you do not only want to show parents for a match (so the match is visible), you may (also) want to […]
The cmake-project Script Generating a CMake Project For a Single Executable in C++
If you ever need to create a project around a single C++ file (or just a few C++ files) in CMake, as you might for quick test cases, you might find it tedious to write a CMakeLists.txt file by hand every time. To make this easier, I’ve written a script called cmake-project that you can […]
Fast Duplicate Tracking DuplicateTracker Merged to KDToolBox
In 2019, I optimized QStringList::removeDuplicates() by using std::pmp::unordered_set with a std::pmr::monotonic_buffer_resource, when available. The class that I wrote to encapsulate this optimization has since been re-implemented three times. The latest iteration has recently landed in KDToolBox. If you have code that looks a bit like this: then you should read on.
KDE Frameworks – Part 1 KConfig, for Storing and Fetching Configuration Data
Qt provides a rich set of high-quality, cross-platform APIs, but can't cover every possible use case. KDE has created code to fill these gaps in its many projects, sharing these libraries as KDE Frameworks.
Improving C++ Development in Visual Studio Code with compile_commands.json and Bear
As described in our previous blog posts, you can use Visual Studio Code as an IDE for C++ projects. It works particularly well with CMake-based projects. Unfortunately, with build systems not supported natively by VS Code, you need to manually configure include paths and compilation definitions, for the code model to work properly. Since the […]
Hotspot: How const Can Improve Performance
Some time ago, I noticed that a unit test was quite slow, using 100% CPU for a number of seconds at one point in the test. I used perf and KDAB’s Hotspot to record and examine where the CPU cycles were spent in that unit test, and I quickly noticed that a lot of time […]
Automotive Grade Maps and Navigation for Everyone Technical Preview Release
It is our pleasure to introduce a shiny new Maps & Navigation solution for QML developers! This QML plugin is a joint effort between KDAB & General Magic to bring the excellent General Magic Maps and Navigation SDK to the QML world. What makes the General Magic QML plugin special? It’s easy to use. With […]