Sign up for the KDAB Newsletter
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Find what you need - explore our website and developer resources
22 December 2020
The QVariant class is a cornerstone in Qt. It's used in the property system in model/view to exchange data between C++ and QML. But what is a QVariant, exactly?
It's a type-erased container, akin to std::any from the C++ Standard Library; a QVariant is able to store an object of any type (well, almost any type) and it also remembers which type it's stored inside. Let's see how QVariant works in practice in this video.
The example code showcased in this video is available here: https://github.com/KDAB/kdabtv
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Upgrade your applications from Qt 5 to Qt 6 with KDAB’s migration services. Get a free migration assessment and join a hands-on workshop to prepare your team for a successful transition!
Learn more
Learn Modern C++
Our hands-on Modern C++ training courses are designed to quickly familiarize newcomers with the language. They also update professional C++ developers on the latest changes in the language and standard library introduced in recent C++ editions.
Learn more