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
19 July 2022
We are currently working on migrating an in-house tool to Qt 6. While doing so, there were some runtime issues relating to QVariant. In this episode, I'll discuss these.
0:00 Introduction
1:00 Recap of the episode on combo boxes in Qt Designer
2:17 The problem in Qt6
4:04 Debugging the code to see the underlying problem
8:33 Adding QVariant::fromValue to solve the problem
9:54 Just be carefull
10:41 Problems with QVariant::toString()
13.36 operator<()(QVariant, QVariant) is gone
14:46 QVariant::compare
18:47 Improved Money comparison in Qt5
20:10 Improved Money comparison in Qt6
Links:
Original episode on combo box setup: https://youtu.be/X3cb5RtfsFo?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI
More details on QMetaType: https://www.qt.io/blog/whats-new-in-qmetatype-qvariant
The example code showcased in this video is available here: https://github.com/KDAB/kdabtv/tree/master/Qt-Widgets-and-more/Qt6Migration
All QML tips and tricks videos : https://www.youtube.com/playlist?list=PL6CJYn40gN6jWHP5krsQrVGyYtKh3A3be
All Qt Widgets and more videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6gf-G-o6syFwGrtq3kItEqI