Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
pthread w/ class in QT
Hello ! : )
I'm making a qt program which need to be able to run 2 method of 2 differents class at the same time. I already made it run with the method declared in the main() and it works, but i need to make it run with the 2 methods from different classes, with pthread.h . I'm stuck ! Need help , thanks : )
it must be pthreads?
If something very light, u could use a QTimer.
else, this might be helpful
@mrjj No it mustn't be pthreads but its too heavy to use a Qtimer, any suggestions ? The link you gave does not help me to use pthread with class, unless i have made a bad reading but thanks : )
is not based on classes, its a c api.
But nothing wrong calling some class function from the thread.
Since its C it dont accept a class for callback directly.
however, Qt has it own thread handling
with many examples
So maybe thats an options?
@mrjj i'm using qt4, does this work?
also , should be quick to test out using