Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Synchronous usage of state machines

Synchronous usage of state machines

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.1k Views 1 Watching
  • 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.
  • T Offline
    T Offline
    Thart
    wrote on last edited by
    #1

    Is there any way (or workaround) to use Qt State Machine Framework synchronously without message loop?

    Problem in fact, that we plan to use state machines for internal logic of the feature which will be launched without GUI (no normal message loop). Local message loops after any operation with state machine also aren't desirable, especially when this can lead to unnecessary message processing (GUI, timers, etc).

    1 Reply Last reply
    0
    • T Offline
      T Offline
      Thart
      wrote on last edited by
      #2

      Does anybody know the answer?

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi,

        The QStateMachine has it's own event loop that doesn't depend on the GUI event loop, so you should not have interference problem.

        Does it help ?

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply
        0
        • B Offline
          B Offline
          belab
          wrote on last edited by
          #4

          The only restriction is that you have to use a QThread.

          1 Reply Last reply
          0
          • T Offline
            T Offline
            Thart
            wrote on last edited by
            #5

            [quote author="SGaist" date="1373835054"]Hi,

            The QStateMachine has it's own event loop that doesn't depend on the GUI event loop, so you should not have interference problem.

            Does it help ?[/quote]

            [quote author="belab" date="1373912198"]The only restriction is that you have to use a QThread.[/quote]

            Thanks! I've tried with QThread and its event loop and have ensured that this solution is not acceptable for us. It's more safe and easy to use true synchronous state machine instead of complex workaround with QThread and synchronization issues.

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You might want to bring this point on the mailing list, you could catch some other ideas that could be good. The list is were you'll find the developers/maintainers, this forum is more user oriented.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              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