Qt Quick Best Practices and Design Patterns
summary
Built a working Qt Media Hub clone (XBMC-like) to test QML at scale and finds the decisive pattern: move business logic into C++ as a one-way runtime and keep QML strictly presentation. Use register C++ types not context properties so QML controls lifetime; prefer typed Q_PROPERTY with notify over QVariant; create models on demand (QAbstractItemModel configurable from QML) and use QDeclarativeParserStatus to batch initialization. Share stateless JS with pragma library, expose collections via QDeclarativePropertyMap, and package downloadable skins via a custom QNAM scheme.
AI-written summary · about
chapters (9)
- 0:00Introduction and background
- 12:43C++ and QML separation
- 25:19QML component design
- 39:30JavaScript in QML
- 43:36Model-view interactions
- 45:01Graphics performance tips
- 48:21Downloadable skins and sandboxing
- 52:12Resolution and focus handling
- 53:00Q&A
related talks
30mThe building blocks of QML, and how to use it with C++
01h 22mArranging Items, QML Components and Debugging QML (part 4/4)
24mDesigning UI Architecture for Embedded Devices with Qt and QML
01h 22mQt Quick - Introduction to Qt Quick (part 1/4)
24mThe Roadmap: Next Generation Qt (part 2/2)
01h 21mQt Quick - User Interaction - User Input and States (part 2/4)
26mPractical application scripting with QML
52mThe 8 mistakes of QtQuick newcomers
