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 […]
C++ Get the RSS Feed
Content related to C++
Mixing C++ and Rust for Fun and Profit: Part 3 How to not reinvent the wheel
In the two previous posts (Part 1 and Part 2), we looked at how to build bindings between C++ and Rust from scratch. However, while building a binding generator from scratch is fun, it’s not necessarily an efficient way to integrate Rust into your C++ project. Let’s look at some existing technologies for mixing C++ […]
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 […]
Reducing Visual Studio Installations with Toolchains
If you work on C++ projects on Windows that need to be built with multiple Visual Studio C++ compiler versions, you need some way to manage the installations of all these build environments. Either you have multiple IDEs installed, or you know about build tools (https://aka.ms/vs/17/release/vs_BuildTools.exe) and maybe keep only the latest full VS IDE […]
Introducing: KDSPDSetup Initialize loggers with simple config files and focus on your code's functionality
KDAB’s newest open-source library is now publicly available: KDSPDSetup! KDSPDSetup is a small library written in modern C++ (≥ 20) that initializes objects from the spdlog library by reading a toml configuration file. This makes setting up loggers more convenient and results in cleaner-looking code. Let’s take a look at an example to see how […]
Mixing C++ and Rust for Fun and Profit: Part 2 Of structs and strings
In the beginning, there was C. That sentence actually could serve as the introduction to a multitude of blog posts, all of which would come to the conclusion “legacy programming conventions are terrible, but realistically we can’t throw everything out and start over from scratch”. However, today we will merely be looking at two ways […]
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 […]
Mixing C++ and Rust for Fun and Profit: Part 1 Or why switching to Rust is such a large undertaking
For quite some time, I have been bothered by this thought: Individual programming languages (C++, Rust, Go, etc.) are traditionally viewed as walled gardens. If your main() function is written in C++, you had better find yourself C++ libraries like Qt to build the rest of your codebase with. Do you want to use Flutter […]
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++ […]
KDAB at Meeting C++ in Berlin November 12th - 14th
KDAB is proud to be a Silver Sponsor at this year’s Meeting C++, a highly recommended 3-day hybrid event for the European C++ community, offering 44 Talks in 4 tracks, November 12th – 14th. While this is also an in-person event, there is a substantial concurrent online program, so that high-class international speakers can easily […]