Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-107209

Update documentation on how to integrate state machines into QML modules

    XMLWordPrintable

Details

    • 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

        Activity

          People

            ulherman Ulf Hermann
            skoh-qt Sze Howe Koh
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There is 1 open Gerrit change