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
14 August 2024
Qt has a property system that is used from many places, including Qt Designer, QML, and other language bindings. It can, however, also be very useful on its own, as in the example I show towards the end of this episode. Watch this episode to get a better understanding of how it all fits together.
Links:
* Behind the scene tour on Q_OBJECT:
1) https://youtu.be/zUtLpNKsJ_0?list=PL6CJYn40gN6iFcTyItvnE5nOmJR8qk_7o /
2) https://www.youtube.com/watch?v=UCQhsq14sq8&list=PL6CJYn40gN6iFcTyItvnE5nOmJR8qk_7o&index=11
* Migration with KDAB: https://www.kdab.com/services/software-consulting/legacy-framework-migration/
The example code showcased in this video is available here: https://github.com/KDABLabs/kdabtv/tree/master/Programming-With-Qt-Widgets
0:00 Introduction
0:32 Properties in Qt
3:33 QML integration (Q_OBJECT Macro)
5:05 C++ Q_PROPERTY
9:25 Code Migration - KDAB
9:46 Q_PROPERTY example
13:49 Using properties
15:19 Iterating through properties
19:27 Real world example
26:10 Conclusion
All 'Introduction to Qt Widgets - Module 1' videos: https://www.youtube.com/playlist?list=PL6CJYn40gN6hgf7zCKF2Rv9Y0WoN8RVGf
All 'Introduction to Qt Widgets - Module 2' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6j_c41CFMprvg9EiWz0WdSy
All 'Introduction to Qt Widgets - Module 3' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6hWZO_viEf1rfjgk4E6SCKd
All 'Introduction to Qt Widgets - Module 4' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6iXUNQMb2GkEjV_oK6Xid9-
All 'Introduction to Qt Widgets - Module 5' videos:
https://www.youtube.com/playlist?list=PL6CJYn40gN6h1tsLAETdrrFlsVMeYpiHI
Stay on top of the latest news, publications, events and more.
Go to Sign-up
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