Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Code examples - statemachine using Qt Quick and C++
Forum Updated to NodeBB v4.3 + New Features

Code examples - statemachine using Qt Quick and C++

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 4 Posters 5.7k 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.
  • Q Offline
    Q Offline
    qtd1d1
    wrote on 16 Jan 2012, 09:22 last edited by
    #1

    Hi,

    has anyone an idea where I could get code examples to use a statemachine wit Qt Quick and C++?

    This video is exactly how I would like to use the statemachine: "Anatomy of real world apps - dissecting cross-platform apps written using Qt Quick and C++":http://qt-project.org/videos/watch/anatomy-of-real-world-apps-dissecting-cross-platform-apps-written-using-qt

    "Here are the slides":http://www.slideshare.net/mariusbu/the-anatomy-of-real-world-apps

    Thanks

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gfinne
      wrote on 24 Jan 2012, 19:17 last edited by
      #2

      Hi,
      I'm also interesting in using statemachine with Qt Quick and c++. I only find an example here:
      "Your text to link here...":http://lists.qt.nokia.com/pipermail/qt-qml/2010-November/001810.html
      Hope it can help

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        qtd1d1
        wrote on 25 Jan 2012, 07:58 last edited by
        #3

        Thanks,

        that's another interesting post I found: "blog.codeimproved.net":http://blog.codeimproved.net/2011/12/devdays-lessons-how-to-use-a-state-machine-to-drive-a-qml-ui/

        An official example delivered by the Qt-Team would be great.

        1 Reply Last reply
        0
        • R Offline
          R Offline
          rchamberlin
          wrote on 9 Jul 2014, 14:33 last edited by
          #4

          I realize this is an old thread but I never found a working code example. I worked through both of the links above and was able to get a C++ state machine working with QML for UI. I've added a sample project based on both links posted above:

          "https://github.com/rchamberlin/QmlStateMachine":https://github.com/rchamberlin/QmlStateMachine

          Hopefully it'll help someone in the future.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            andreyc
            wrote on 9 Jul 2014, 19:08 last edited by
            #5

            Thank you for the sample project.

            I tried to build it and got the errors:
            @
            WARNING: Failure to find: qml.qrc
            /home/achichinov/Qt5.3.1/5.3/gcc_64/bin/rcc: File does not exist 'qml.qrc'
            @

            Do I need to create it or you missed it in your submit?

            1 Reply Last reply
            0
            • A Offline
              A Offline
              andreyc
              wrote on 9 Jul 2014, 19:19 last edited by
              #6

              Created qml.qrc and added main.qml into it.
              It works now.

              Thank you for good and simple example.

              1 Reply Last reply
              0
              • R Offline
                R Offline
                rchamberlin
                wrote on 9 Jul 2014, 19:29 last edited by
                #7

                [quote author="andreyc" date="1404932898"]Thank you for the sample project.

                I tried to build it and got the errors:
                @
                WARNING: Failure to find: qml.qrc
                /home/achichinov/Qt5.3.1/5.3/gcc_64/bin/rcc: File does not exist 'qml.qrc'
                @

                Do I need to create it or you missed it in your submit?[/quote]

                Thanks. I forgot that it doesn't add those by default. I've added it to source control and it's out there now.

                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