This blog will give you a brief overview of profiling C and C++ applications. Additionally, it will lay before you all of the tools available, with the purpose of aiding you in choosing the right tools at the right times.
C++ Get the RSS Feed
Content related to C++
CXX-Qt 0.4 Released
We just released CXX-Qt version 0.4! CXX-Qt is a set of Rust crates for creating bidirectional Rust ⇄ C++ bindings with Qt. It can be used to integrate Rust into C++ applications using CMake or build Rust applications with Cargo. CXX-Qt provides tools for implementing QObject subclasses in Rust that can be used from C++, […]
Understanding qAsConst and std::as_const
Every now and then, when I submit some code for a code review, people tell me that I forgot qAsConst. Now I have one more enemy, namely: Clazy! It has also started saying this, and I guess it’s about time for me to figure out what is going on. When do I need qAsConst and […]
C/C++ Debugging Tools An Overview of Debugging Tools for C and C++ Applications
In this blog on debugging and profiling, I would like to give you an overview of the debugging tools that exist for C and C++ applications. Automated Testing The first thing you need to do is make sure your code is properly tested. This, in itself, is not debugging, but it enables you to make […]
Fun with Paths and URLs in QML Managing Your QML Assets with Ease
There are a few small, and sometimes already quite old, features in Qt that, when combined, can be a very nice way to deal with assets in your QML application — especially if some of them live on the file system, some in a resource, and some may need localization or translation. Let’s dive in! […]
Structured Bindings with Qt SQL
Some time ago, I wrote a post about integrating Qt’s associative containers with the fancy new C++ features, range-based for loops with structured bindings. That post inspired KDAB’s own Giuseppe D’Angelo to add the asKeyValueRange member function to both QHash and QMap. Now it’s possible to iterate over them with a simple range-based for loop, […]
Say No to Qt Style Sheets Making the Right Choice Between QStyle and Qt Style Sheets, Upfront
You have two choices when it comes to giving a custom style to your Qt widgets. Qt Style Sheets are very convenient for getting started — just a few CSS-like rules, and they work. It is our experience, however, that Qt Style Sheets create too much trouble and a QStyle subclass (*) gives a better […]
JSONify All Things Extending the nlohmann/json Library
The nlohmann/json library is everything a developer can expect from a modern library — easy to integrate and JSON objects are treated as first class citizens with a very intuitive API. However, it has one problem that is widely mentioned across the internet, which I’ll tell you about below. Various solutions to the problem have […]
C++23 Will Be Really Awesome (a blog for April Fools Day)
C++23 is feature complete and on track to be released next year. While many people are complaining that it’s, after all, a “minor” release (as the pandemic made the Committee work very difficult), C++23 still has a few very significant changes. In this blog post, I want to talk about what I think is my […]
CXX-Qt Safe Rust Bindings for Qt
At KDAB, we have been investigating how to integrate Rust with Qt in a safe and idiomatic way. The solution we are currently working on is called CXX-Qt. It’s available in the GitHub and on crates.io. This blog post discusses the journey of CXX-Qt — where it started, where it can be used right now, […]