Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.7, 6.2, 6.4.1, 6.4, 6.5.0 Beta1
-
6.2.6, 6.4.0
-
a7e44fcdcc (qt/qtscxml/dev) ea8b1cd246 (qt/qtscxml/6.4) ea8b1cd246 (qt/tqtc-qtscxml/6.4) a7e44fcdcc (qt/tqtc-qtscxml/dev) ebcc383385 (qt/tqtc-qtscxml/6.2) ea8b1cd246 (qt/qtscxml/6.4.1) ea8b1cd246 (qt/tqtc-qtscxml/6.4.1)
Description
qt_add_statecharts() automatically runs qscxmlc to generate the state machine class in C++.
However, if the state machine is to be used in QML, it currently needs to be registered at runtime (e.g. qmlRegisterType<MyStateMachine>("MyStateMachine", 1, 0, "MyStateMachine"); ) as documented at https://doc.qt.io/qt-6/qtscxml-instantiating-state-machines.html . Consequently, the state machine is invisible to the Qt Quick Compiler – qmlsc says,
Warning: Failed to import MyStateMachine. Are your include paths set up properly?
Attachments
For Gerrit Dashboard: QTBUG-107209 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
436847,1 | WIP: Update examples to use qt_add_qml_module | dev | qt/qtscxml | Status: NEW | -2 | 0 |