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
11 February 2021
In this episode, I'll show how you can use your own custom types to communicate between a model and a delegate editing these custom types. My example is a Money class which contains a currency and an amount. The delegate will see Money instances, rather than parse them from their string representation.
NOTE: This video was filmed before Qt6 was out, and it seems that, contrary to rumors, the function registerConverter is still there: https://doc.qt.io/qt-6/qmetatype.html#registerConverter.
The example code showcased in this video is available here: https://github.com/KDAB/kdabtv/tree/master/Qt-Widgets-and-more/CustomDataTypesInModel
All Qt Widgets and more videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI
Stay on top of the latest news, publications, events and more.
Go to Sign-up
Learn Rust
In collaboration with our partners Ferrous Systems, KDAB provides a variety of introductory and advanced training courses for the Rust language.
Learn more