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 […]
Blog Archives
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 […]
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 […]