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. [solved]Sending series of values to QML from C++ with delay
Forum Updated to NodeBB v4.3 + New Features

[solved]Sending series of values to QML from C++ with delay

Scheduled Pinned Locked Moved QML and Qt Quick
7 Posts 3 Posters 3.6k 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.
  • M Offline
    M Offline
    muthu005
    wrote on last edited by
    #1

    I have designed a speedometer in QML and sending the speed value from C++.

    I want to pass a series of speed values to the speedometer with some delay between each value. what technique i hv to use to do this task?

    I have one more question too:
    If i display a QML UI using C++ apart from the main function, the UI is not visible. is there any way to display the QML UI from any function in C++

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      If you don't want to see them all in one go, then why do you send them all in one go?

      1 Reply Last reply
      0
      • M Offline
        M Offline
        muthu005
        wrote on last edited by
        #3

        Thanks for the reply Andre.

        I want my each value sent to be displayed in the speedometer. (the speedometer should move randomly according to the series of values sent). how can i do this?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andre
          wrote on last edited by
          #4

          Just send them at the time you want the change to happen. That is, if you want the meter to move to the next value once per second, the easiest would be to just send the value to QML once per second, right?

          1 Reply Last reply
          0
          • M Offline
            M Offline
            muthu005
            wrote on last edited by
            #5

            can i accomplish it through threads waiting for particular time and then sending value or using timers?
            which is better way?

            is there any good way apart from these for it?

            1 Reply Last reply
            0
            • S Offline
              S Offline
              Scylla
              wrote on last edited by
              #6

              What's about QTimer. On every timeout() signal, send the value.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                muthu005
                wrote on last edited by
                #7

                used QTimer and got the perfect result....Thank you all

                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