The upcoming version of the C++ Standard (C++2a) is proposing to deprecate certain usages of the volatile keyword, by adopting the P1152 proposal (Deprecating volatile). Despite the somewhat “flamboyant” title, the actual deprecated parts are very limited and indeed the paper limits the deprecation to somehow language/library corner cases and/or dangerous antipatterns. For instance certain […]
Author Archives: Giuseppe D'Angelo
Qt World Summit 2019 talk videos are online
Did you miss the past Qt World Summit? Were you there, but you couldn’t attend that talk or two that you really wanted to see because the conference was so, so packed with awesome content? Fear no more! We are glad to announce that the talks at the past Qt World Summit 2019 in Berlin […]
A little hidden gem: QStringIterator
A few days ago Marc Mutz, colleague of mine at KDAB and also author in this blog, spotted this function from Qt’s source code (documentation): Apart from the mistake of considering empty strings not uppercase, which can be easily fixed, the loop in the body looks innocent enough. How would we figure out if a […]
The Eight Rules of Multithreaded Qt The biggest dos and don'ts for multi-threading in Qt
While the concept of multithreading may be straightforward, code with threads is responsible for some wicked bugs, which can be nearly impossible to reproduce or track down. This makes writing bullet-proof code using threads a tall order. Let’s look a little deeper into why that is. First, you need better than average knowledge about the […]
UiWatchDog: a keepalive monitor for the GUI thread Part of the KDToolBox series
Continuing our blog series about KDToolBox, this time we will discuss UiWatchDog, a keepalive monitor for the GUI thread. Alive? A fundamental rule when writing applications in event-driven UI frameworks such as Qt is: do not ever block the GUI thread! The GUI thread is also usually called the main thread of the application — […]
KDTableToListProxyModel: a flattening proxy model
With this blog post we are going to kickstart our brand new blog series about KDToolBox. The first class we’re exploring is KDTableToListProxyModel, a table-to-list proxy model. The main use case for KDTableToListProxyModel is exposing tabular models to Qt Quick. Qt Quick has a certain number of “view” elements that only support list models: for […]
Introducing KDToolBox KDAB R&D contribution of useful C++ classes
At KDAB we invest a significant amount of efforts in research and development. We are always looking for new tooling, libraries and utilities that can make our job easier and improve the C++ and Qt ecosystems. Ultimately, the gained knowledge and skills make our customers happier. As part of this process we develop lots of […]
New in Qt 5.11: improvements to the model/view APIs (part 2) Automated validity checks using QAbstractItemModelTester
In the last episode of this series we discussed QAbstractItemModel::checkIndex(). QAbstractItemModel::checkIndex() is a function added in Qt 5.11 that allows developers of model classes to perform some validity checks on the QModelIndex objects passed to the model; specifically, on the indices passed to the APIs that model classes need to implement (rowCount(), columnCount(), data, setData(), […]
New in Qt 5.11: improvements to the model/view APIs (part 1)
The Qt model/view APIs are used throughout Qt — in Qt Widgets, in Qt Quick, as well as in other non-GUI code. As I tell my students when I deliver Qt trainings: mastering the usage of model/view classes and functions is mandatory knowledge, any non-trivial Qt application is going to be data-driven, with the data […]
KDAB at QtDay 2018
QtDay is the yearly Italian conference about Qt and Qt-related technologies. Its 2018 edition (the seventh so far!) will be once more in the beautiful city of Florence, on May 23 and 24. And, once more, KDAB will be there. I am also glad to announce that my talk has also been accepted: I am […]