QProperty - QML property binding in C++
summary
Qt6 adds QProperty to bring QML-style property bindings into plain C++. The talk shows a working C++ implementation (copy‑pasteable C++11) that supports lazy evaluation (C++ bindings evaluate on read, unlike QML’s eager init), partial binding (observers register only accessed dependencies), change callbacks instead of Qt signals, and aliasing. Two integration proposals are compared: a qprivate-property/macros approach and a bindable keyword approach; code lives in dev branch and runs, but MOC and API stability remain unresolved.
AI-written summary · about
chapters (22)
- 0:00Intro
- 0:29Overview
- 2:18What is a QML property binding?
- 3:08What is a binding expression?
- 4:02How to change a property binding in run-time
- 6:51QML property binding evaluation
- 9:00QML property binding partial evaluation
- 12:11C++ property binding
- 13:17C++ vs QML property binding
- 22:28Partial binding evaluation
- 26:00QProperty callbacks - "signals"
- 26:34C++ vs QML property signals
- 27:54How to change property binding in run-time? ...
- 29:09C++ vs QML property alias
- 29:55QProperty summary
- 32:08Current status in dev branch
- 35:30Expand Q_PRIVATE_QPROPERTY
- 37:52MOC generates body of the functions
- 43:42QObject from Qt5 to Qt6 - option 2
- 46:49What do we get in the end? - option 2
- 47:11Option 1 vs Option 2
- 49:38Useful links
related talks
16mProperties & Bindings for Modern C++
01h 33mPython and C++: the best of both worlds
55mKEYNOTE: Qt Containers and Algorithms
01h 29mValue-oriented design in an object-oriented system
31mThe secret to enhancing Qt for Python applications
01h 21mAdvanced Qt - A Deep Dive 6/6 - ModelView Part 2
01h 25mAdvanced Qt -A Deep Dive 1/6 Graphics View Part 1
15mUsing Reflection to Generate C++ Python Bindings
