Important: Please read the Qt Code of Conduct -

Progress Bar Value Linked With QThread from C++

  • Hi Guys,
    I am using Qt and QML where my progress bar value depend on work done at backend in C++. My c++ function keeps updating contents from database to csv file.In the mean time on every 10 % of data updated to CSV file i am sending a signal to QML. so that my progress bar shows the value.

    So all the above process cannot be done on a single thread as it blocks GUI.So i am using a class derived from QThread and starting that thread when call from QML has come. So this works fine for me.

    The thing i need to know is ..Is the approach what i am using is good ? or else is there any other Qt classes that support this action better than QThread ?

  • Moderators

    from the design you mentioned it's ok and and every-day use-case.
    When your application successfully runs everything is fine ;)

  • Thanks ..I came across QFutureWatcher Class . So i was in doubt , will that be providing any benifits on performance issues?

Log in to reply