Programming with Qt Quick 6/6 - C++ Integration
summary
Shows exactly how to push real C++ objects into QML: create C++ instances, call setContextProperty on the view’s rootContext to expose them (the objects must outlive the view or cause segfaults), or register types with qmlRegisterType to let QML instantiate C++ items. Demonstrates a C++ visual Ellipse via QDeclarativeItem with Q_PROPERTY color, Q_INVOKABLE methods, signals/slots, a QDeclarativeListProperty for child items, qrc resource packaging, and packaging as a QDeclarativeExtensionPlugin via qmldir — examples run and integrate with QML.
AI-written summary · about
chapters (10)
- 0:00Start
- 0:08Qml and C + +
- 0:35Exporting C + + Instanced Objects into the Qml Environments
- 3:26Abstract Item Model Pointer
- 5:19Abstract Item Model
- 10:12Export Types
- 17:12Draw Ellipse
- 36:35Defining Custom Property Types
- 51:29Register Types
- 52:45Shared Library
related talks
30mThe building blocks of QML, and how to use it with C++
25mBest Practices for using QML and QtQuick
27mSet Yourself up for Success — Lessons Learned from Building 100+ Devices with C++/Qt/QML
01h 00mQt for MCUs – A Deep Dive
58mQt for Device Creation
01h 30m“Qt as a C++ Framework: History, Present State and Future”
02h 16mWORKSHOP: Back to Basics: writing a model
28mImplementing Modern Design Patterns with Qt
