If you’re following our Youtube channel you might have heard me talking about QVarLengthArray. If you’re not… you should follow us! But let me give you a quick recap. QVarLengthArray is a Qt container that acts like a vector; its elements are stored contiguously in memory and it has a dynamic size. At any time […]
Author Archives: Giuseppe D'Angelo
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 […]
KDFunctionalSortFilterProxyModel A Functional Sort/Filter Proxy Model
Another day, another small addition to KDToolBox, KDAB’s collection of miscellaneous useful C++ classes and stuff. In this post, we’re going to talk about KDFunctionalSortFilterProxyModel, which is a convenience subclass of QSortFilterProxyModel. What’s a proxy model to begin with, and what’s QSortFilterProxyModel? Well, that explanation requires a bigger space than what I have in this […]
On the Removal of toSet(), toList() and Others or "How Do I Convert a QList to QSet in Qt 6?"
(Apologies for the clickbait in the post title! But I’d really like people who are searching for solutions to read this.) Between Qt 5.14 and Qt 5.15, my colleague, Marc Mutz, and I submitted a series of patches to Qt that added “range constructors” to the Qt containers. This brought Qt containers one step closer […]
New in Qt 6.1: std::hash Support for QHash
In the previous blog post of this series, we discussed KDToolBox::QtHasher, a helper class that allows us to use unordered associative containers datatypes which have a qHash() overload but not a std::hash specialization. The majority of Qt value classes indeed are lacking such a specialization, even if they do provide a qHash() overload. For our […]
Single-Shot Signal/Slot Connections
Sometimes it’s useful to establish a connection between a signal and a slot that should be activated only once. This is not how signal/slot connections normally behave. Remember that, when a connection is established, it will stay active until: the connection is explicitly disconnected; or the sender object is destroyed; or the receiver object is […]
Signal/Slot Connection Throttlers
Another day, another blog post about KDToolBox, KDAB’s collection of miscellaneous useful C++ classes and stuff. Today, we’ll talk about ways to throttle your signal/slots connections — in other words, how to activate a slot less often than the emission rate of the signal it’s connected to. The usual reason why you may want something […]
Using Qt Datatypes in Standard Library Unordered Containers
In the previous blog post about qHash, we explained: how to declare an overload of qHash for your own datatypes, how to hash Qt datatypes for which Qt does not provide a qHash overload, and why you can’t use a type from the Standard Library (or just another library) as a key in QHash (newsflash: […]
Qt Embedded Days 2021
This brand new online conference hosted by KDAB offers in-depth technical topics from embedded developers for embedded developers – especially, but not exclusively, for those working with Qt on Embedded Devices. The call for papers is now closed and the program will be announced as soon as the committee has made a final selection. We […]
KDSingleApplication: a class for single-instance policy applications
Another day, another blog about some of KDAB’s utility classes. Now it’s the turn of KDSingleApplication, a class that helps implement applications that follow the single-instance policy. What is a single-instance policy? Single-instance policy refers to those applications that want to spawn a unique instance for a given user session. Even when launched multiple times, […]