[Moved] qt thread



  • Hi,
    What is the best way to implement the thread in Qt. I heard that its necessary to implement required processing in the run() method only.
    Im doing something like this, data/input im getting from the outside as soon as i get i ll copy that data into local structure and start to plot that data in thread.After copying that data in local buffer i ll start the thread and Plotting i have put it in run() method. But data plotting is very slow it looks like thread is not running.

    Any solution?


  • Moderators

    It's advided not to use the run() approach you are referring to from the Qt docs. It's better to subclass a QObject instead.

    Have a look at this wiki page :
    http://developer.qt.nokia.com/wiki/Threads_Events_QObjects

    Or use the tag on the right this wil give you an overview of all topics on threads on defnet.


Log in to reply
 

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