The building blocks of QML, and how to use it with C++
summary
Explains concrete patterns: expose C++ singletons via register uncreatable type and expose constructible C++ classes via register creatable type, keep heavy list models in C++ not JavaScript, and restrict JS to event handlers. Advises splitting QML into small components (aim under 1,000 lines), use Loader to reduce load time, and watch for binding explosions that cause runtime slowdowns; recommends QML profilers because debugging is essentially printf-level. Notes deployment caveats (QML files editable by users unless compiled) and testing is harder than C++.
AI-written summary · about
chapters (9)
- 0:00Introduction and context
- 2:29Advantages of QML
- 4:20Challenges of using QML
- 8:35The role of C++
- 10:52Best practices for QML
- 13:45Modularizing QML code
- 15:47Connecting C++ to QML
- 19:13Architecture and performance
- 22:33Q&A session
related talks
53mQt Quick Best Practices and Design Patterns
01h 22mArranging Items, QML Components and Debugging QML (part 4/4)
49mQt Quick Best Practices and Design Patterns
01h 00mProgramming with Qt Quick 1/6 - Meet Qt Quick Part 1
57mProgramming with Qt Quick 6/6 - C++ Integration
34mProgramming with Qt Quick 5/6 - States Animations
01h 22mQt Quick - Introduction to Qt Quick (part 1/4)
27mSet Yourself up for Success — Lessons Learned from Building 100+ Devices with C++/Qt/QML
