Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. How to use scc and scxml with a qmake-based project?

How to use scc and scxml with a qmake-based project?

Scheduled Pinned Locked Moved Unsolved Qt Creator and other tools
8 Posts 3 Posters 2.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rmam
    wrote on last edited by
    #1

    I've been looking into Qt's support for scxml and I'm very interested in generating state machines from state charts. However, I haven't had any success getting Qt Creator to generate any code from scxml definitions. So far I've added a scxml document to a qmake project under the STATECHARTS variable, created a basic state machine diagram and ran build, but I'm yet to get the build process to generate any code. Does anyone know if this feature is still supported by Qt Creator? If it is, what steps should be taken to get a qmake-based project to generate C++ code for state machines defined in scxml documents?

    jsulmJ 1 Reply Last reply
    0
    • R rmam

      I've been looking into Qt's support for scxml and I'm very interested in generating state machines from state charts. However, I haven't had any success getting Qt Creator to generate any code from scxml definitions. So far I've added a scxml document to a qmake project under the STATECHARTS variable, created a basic state machine diagram and ran build, but I'm yet to get the build process to generate any code. Does anyone know if this feature is still supported by Qt Creator? If it is, what steps should be taken to get a qmake-based project to generate C++ code for state machines defined in scxml documents?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @rmam Did you check this: https://doc.qt.io/qt-5.10/qtscxml-index.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      R 1 Reply Last reply
      1
      • jsulmJ jsulm

        @rmam Did you check this: https://doc.qt.io/qt-5.10/qtscxml-index.html

        R Offline
        R Offline
        rmam
        wrote on last edited by
        #3

        @jsulm Yes, and I've followed the SCXML calculator example. Thus, I've added Qt's SCXML module to the project and a scxml document to the STATECHARTS diagram. The example states that after adding the module and the scxml file, qscxmlc would be run automatically to generate the source files. Yet, after running the build process I see no new source files.

        jsulmJ 1 Reply Last reply
        0
        • R rmam

          @jsulm Yes, and I've followed the SCXML calculator example. Thus, I've added Qt's SCXML module to the project and a scxml document to the STATECHARTS diagram. The example states that after adding the module and the scxml file, qscxmlc would be run automatically to generate the source files. Yet, after running the build process I see no new source files.

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @rmam You should delete the build folder, run qmake and then build after changing pro file

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          3
          • R Offline
            R Offline
            rmam
            wrote on last edited by
            #5

            @jsulm thanks for the help. I've followed your tips and ran a test with a Qt 5.10 build and it seems that everything worked well. Kudos.

            I've also tried with an old Qt 5.3 project but that project threw an error ("Unknown module(s) in QT: scxml"). I've browsed through the docs but haven't found any information on which Qt version was required to be able to integrate SCXML-based stuff in a project. Does anyone know in which release was the support for SCXML introduced?

            sierdzioS jsulmJ 2 Replies Last reply
            0
            • R rmam

              @jsulm thanks for the help. I've followed your tips and ran a test with a Qt 5.10 build and it seems that everything worked well. Kudos.

              I've also tried with an old Qt 5.3 project but that project threw an error ("Unknown module(s) in QT: scxml"). I've browsed through the docs but haven't found any information on which Qt version was required to be able to integrate SCXML-based stuff in a project. Does anyone know in which release was the support for SCXML introduced?

              sierdzioS Offline
              sierdzioS Offline
              sierdzio
              Moderators
              wrote on last edited by
              #6

              @rmam said in How to use scc and scxml with a qmake-based project?:

              @jsulm thanks for the help. I've followed your tips and ran a test with a Qt 5.10 build and it seems that everything worked well. Kudos.

              I've also tried with an old Qt 5.3 project but that project threw an error ("Unknown module(s) in QT: scxml"). I've browsed through the docs but haven't found any information on which Qt version was required to be able to integrate SCXML-based stuff in a project. Does anyone know in which release was the support for SCXML introduced?

              It was added in Qt 5.8: https://wiki.qt.io/New_Features_in_Qt_5.8

              (Z(:^

              1 Reply Last reply
              2
              • R rmam

                @jsulm thanks for the help. I've followed your tips and ran a test with a Qt 5.10 build and it seems that everything worked well. Kudos.

                I've also tried with an old Qt 5.3 project but that project threw an error ("Unknown module(s) in QT: scxml"). I've browsed through the docs but haven't found any information on which Qt version was required to be able to integrate SCXML-based stuff in a project. Does anyone know in which release was the support for SCXML introduced?

                jsulmJ Offline
                jsulmJ Offline
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @rmam You can find the version information if you open the documentation for one of the classes, like https://doc.qt.io/qt-5.10/qscxmlcompiler-loader.html

                https://forum.qt.io/topic/113070/qt-code-of-conduct

                R 1 Reply Last reply
                0
                • jsulmJ jsulm

                  @rmam You can find the version information if you open the documentation for one of the classes, like https://doc.qt.io/qt-5.10/qscxmlcompiler-loader.html

                  R Offline
                  R Offline
                  rmam
                  wrote on last edited by
                  #8

                  @jsulm that that doc page refers to a specific class (QScxmlCompiler::Loader) which apparently was added subsequently to a class introduced in a earlier release (QScxmlCompiler, introduced in Qt 5.7).

                  Evenso, apparently those classes cover another feature which is only orthogonaly related with generating source code from SCXML documents.

                  Meanwhile, the Qt Creator's manual entry on Editing State Charts does not mention anywhere which Qt version is required to use this feature. This may cause some confusion as potential users may be led to believe that this feature just works, although it doesn't.

                  1 Reply Last reply
                  0

                  • Login

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • Users
                  • Groups
                  • Search
                  • Get Qt Extensions
                  • Unsolved