Did you know you can programmatically instantiate arbitrary QML components? Dive into a pure QML implementation of the factory pattern with this blog series. In part 2, we explore techniques for laying out the nested components, and learn about the quirks behind QML's Loader.
Qt Get the RSS Feed
Qt and Trivial Relocation (Part 2) Relocation and Erasure
In the last post of this series we discussed the usage of trivial relocation in order to optimize move construction followed by the destruction of the source. To quickly recap: objects of certain datatypes (“trivially relocatable” types) can be moved in memory by simply moving bytes; this can be used to optimize certain bulk operations […]
Qt and Trivial Relocation (Part 1) What is relocation?
The container classes introduced in Qt 4 (Tulip, for the aficionados) had an interesting optimization: the ability to turn certain operations on the contained objects into byte-level manipulations. Example: vector reallocation Consider the reallocation of a QVector<T>: when the vector is full and we want to insert a new value (of type T), the vector […]
Recursive Instantiation with Qt Quick and JSON Factory Design Techniques - Part 1
Recently I was tasked to come up with an architecture for remote real time instantiation and updating of arbitrary QML components. This entry shows how you can use a simple variation of the factory method pattern in QML for instantiating arbitrary components. I’ve split my findings into 3 blog entries, each one covering a slightly […]
Embedding the Servo Web Engine in Qt Using CXX-Qt to integrate a web rendering engine written in Rust
With the Qt WebEngine module, Qt makes it possible to embed a webview component inside an otherwise native application. Under the hood, Qt WebEngine uses the Chromium browser engine, currently the de facto standard engine for such use cases. While the task of writing a brand new standard-compliant browser engine is infamous as being almost […]
Introducing the ConnectionEvaluator in KDBindings Control When Connections are Emitted
Managing the timing and context of signals and slots in multithreaded applications, especially those with a GUI, can be a complex task. The concept of deferred connection evaluation offers a nice and easy API, allowing for controlled and efficient signal-slot connections. This approach is particularly useful when dealing with worker threads and GUI threads. A […]
Incredibly Simple QR Generation in QML Wrapping tiny JS libraries in QML to do quick and simple things effortlessly and elegantly.
The Need for Simple & Modular QR Generation in QML Recently, our designer Nuno Pinheiro needed to generate QR codes for an Android app in QML and started asking around about a simple way to do this. The best existing QML solution was QZXing, a Qt/QML wrapper for the 1D/2D barcode image processing library ZXing. […]
KDSoap 2.2.0 Released
We’re pleased to announce the release of KDSoap version 2.2.0, an update that brings new enhancements to improve both the general build system and client-side functionality. What is KDSoap? KDSoap, a SOAP (“Simple Object Access Protocol“) component rooted in Qt, serves as an essential tool for both client-side and server-side operations. Tailored for C++ programmers […]
Qt 6 WASM: Uploading & Playing Back Audio Files Adapting to the limitations of the web platform and Qt Multimedia
This article walks through an implementation using C++11 or later, Qt 6.5 or later for WebAssembly (multithreaded), and CMake. The browser environment used was Mozilla Firefox 119.0.1 (64-bit) provided by the Mozilla Firefox snap package for Ubuntu. Overview & Motivation Lately, I’ve been working on a small Qt Widgets project to help manage some weekly […]
Supercharging VS Code with C++ Extensions
In a previous blog we demonstrated the most straightforward method to optimize Visual Studio Code for a Qt / C++ environment: simply let the tools do all the work! The example GitHub project we discussed automatically installs both the Microsoft C/C++ and clangd extensions into VS Code. You might wonder why you need both C++ […]