Giuseppe D’Angelo
97 results
A 50 second video with more to demystify the u"..."_s in your C++ code - from Jesper and Giuseppe D'Angelo.
Parts One and Two of our three part Qt 3D series focused on drawing a 3D model and accepting user input, which are necessary building blocks of 3D applications. For the last part, we’ll look at how to use Qt 3D and frame graphs to create some really sophisticated looking graphics, including how to implement multi-pass rendering.
The Practical Programmer’s Guide to C++20
C++20 provides C++ with even more power and expressiveness
Discover the new features of C++20 update in programming. Equip yourself with the skills to stay on top of advancements.
In the previous posts of this series (if you've missed them: parts 1, 2, 3, and 4), we have learned about relocation and trivial relocation. We have explored what relocation means, what trivial relocation means, and how it can be used to optimize the implementation of certain data structures, such as the reallocation of a […]
In the last post of this series we learned that: erasing elements from the middle of a vector can be implemented, in general, via a series of move assignments, move constructions, swaps, destructions for types with value semantics, the exact strategy does not really matter for types with write-through reference semantics, the strategy matters, because […]
Qt and Trivial Relocation (Part 3)
Trivial relocability for vector erasure, and types with write-through reference semantics
21 May 2024
In the last post of this series we started exploring how to erase an element from the middle of a vector. We discussed that in principle there are several different possible ways to implement erase().For instance, a vector could move-assign over the elements to be erased: Alternatively, a vector could use rotations or some other […]
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 […]
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 […]
Giuseppe D'Angelo conducts live Qt patch reviews from YouTube during Qt World Summit 2023. This session covers three patches: a QObject bug fix asserting connection type isn't UniqueConnection for lambdas, adding QChronoTimer functionality, and fixing QtPageLayout pt unit conversion in the Print module.
Giuseppe D'Angelo is going to review Qt Patches live from YouTube during Qt World Summit 2023 everyday at 14:00.
Streamed live on Nov 28, 2023. Giuseppe D'Angelo reviews Qt Patches live on YouTube during Qt World Summit 2023.
PSA: QPointer has a terrible name
12 October 2023
Today's blog post is about a small utility class in Qt with a... questionable name: QPointer. If you're new to Qt, maybe don't check out QPointer's documentation just yet, and try to guess what the class does based on its name alone. I've seen countless users being very confused by it. Some end up using […]
This course explores how the latest C++ standard enables writing modern, efficient, comprehensible, robust and future-proof code. Topics include Ranges library improvements with new views and pipe support, std::expected with monadic operations, new formatting/printing capabilities, immediate functions with consteval if, deducing this, move_only_function, char8_t complexities, and new attributes/function helpers.
Here, Giuseppe D'Angelo answers Jesper’s query about never using exception handling in Qt in a surprising way. Watch this video to learn what you can do and what you shouldn't do.
In this episode, Jesper interviews Peppe on a helper class called propogate_const, which also makes the pointed-to object const in const methods.
The familiar solution for thick value classes that want to preserve binary compatibility is to use the pimpl pattern (private implementation), also known as d-pointer (pointer to data). In future versions of our class, we can freely change the contents of the pimpl (i.e. adding, removing, and/or modifying data members) but the binary compatibility of […]
Guiseppe D'Angelo delivers a masterclass in code review and commentary on the original 'Structural Bindings with Qt Containers' as presented by Jesper Pedersen in the Qt Widgets and More series.
This video shows GammaRay, a Qt introspection tool, running a QML based game, Voltair, on the Steam Deck. It shows how to modify the application and get a quick preview of your change without recompiling it.
Given a strictly positive integer i, this code will calculate i+1 "equally spaced" values between 1 and 0: If you're looking for a trap, this does actually work for any i > 0. One can verify it experimentally; run the code with i from 1 to INT_MAX. For simplicity, just consider the case j = […]
A very common implementation pattern for QObject subclasses is to declare its child QObjects as data members of type "pointer to child." Raise your hand No, keep your hand on your computer input device :-) Nod if you have ever seen code like this (and maybe even written code like this yourself): A fairly common […]