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

  • 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++

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

  • 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?

  • 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?

  • 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?

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

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

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.