Mozilla is the maker of the famous Firefox web browser and the birthplace of the likes of Rust and Servo (read more about Embedding the Servo Web Engine in Qt). Firefox is a huge, multi-platform, multi-language project with 21 million lines of code back in 2020, according to their own blog post. Navigating in projects […]
Technical Get the RSS Feed
CLI++: Upgrade Your Command Line With a New Generation of Everyday Tools
In a recent email, KDABian Leon Matthes highlighted some of his go-to command line tools for everyday use on Unix. His recommendations sparked a lively exchange among our colleagues, each sharing
Setting C++ Defines with CMake Why you should use configure_file instead of add_definitions
The goal When building C++ code with CMake, it is very common to want to set some pre-processor defines in the CMake code. For instance, we might want to set the project’s version number in a single place, in CMake code like this: This sets the CMake variable PROJECT_VERSION to 1.5, which we can then […]
CXX-Qt 0.7 Release
We just released CXX-Qt version 0.7! CXX-Qt is a set of Rust crates for creating bidirectional Rust ⇄ C++ bindings with Qt. It supports integrating Rust into C++ applications using CMake or building Rust applications with Cargo. CXX-Qt provides tools for implementing QObject subclasses in Rust that can be used from C++, QML, and JavaScript. […]
10 Tips to Make Your QML Code Faster and More Maintainable Modernize your code for fun and profit
In recent years, a lot has been happening to improve performance, maintainability and tooling of QML. Some of those improvements can only take full effect when your code follows modern best practices. Here are 10 things you can do in order to modernize your QML code and take full advantage of QML’s capabilities. 1. Use […]
Implementing an Audio Mixer, Part 2 Basic DSP with Qt Multimedia
Recap In Part 1, we covered PCM audio and superimposing waveforms, and developed an algorithm to combine an arbitrary number of audio streams into one. Now we need to use these ideas to finish a full implementation using Qt Multimedia. Using Qt Multimedia for Audio Device Access So what do we need? Well, we want […]
Implementing an Audio Mixer, Part 1 Basic DSP with Qt Multimedia
Motivation When using Qt Multimedia to play audio files, it’s common to use QMediaPlayer, as it supports a larger variety of formats than QSound and QSoundEffect. Consider a Qt application with several audio sources; for example, different notification sounds that may play simultaneously. We want to avoid cutting notification sounds off when a new one […]
Mastering Cross-platform Desktop Apps
Creating applications for cross-platform compatibility is a modern best practice. It increases deployment flexibility and allows applications to reach a wider audience. However, doing it properly can involve some trial and error. At KDAB, we’ve built many multiplatform desktop applications. Here, we’ve compiled a few insights from that process to help you build better software. […]
More Ways to Rust
In our earlier blog, The Smarter Way to Rust, we discuss why a blend of C++ and Rust is sometimes the best solution to building robust applications. But when you’re merging these two languages, it’s critical to keep in mind that the transition from C++ to Rust isn’t about syntax, it’s about philosophy. Adapting to […]
Formatting Selected Text in QML Quasi-Backporting Qt 6.7 QML cursorSelection to Older Versions
Motivation Let’s say we’re working on a QML project that involves a TextEdit. There’s some text in it: here is some text We want to select part of this text and hit ctrl+B to make it bold: here is some text In Qt Widgets, this is trivial, but not so much in QML – we […]