Did you start the thread event loop with exec()? In this case you can send a signal from the GUI thread to the worker thread, basically telling it you need some data. Then the worker thread will send a signal to the GUI thread, with some parameters. This is the safest way.
If you didn't start the event loop and don't want to redesign your code now, then you must have an endless loop in your thread's run method. But you'll have to post some code, or at least describe the way you do things better.
In that function, do you perform some specific thread processing? Because the function will be executed the GUI thread context. This could explain why the members/variables are messed up.The problem is that it doesn't work.. when I am inside a function of the model thread ( a QThread derived class) called from the GUI I got different values than if I run the same function from the normal model "path".. like they are different instances, or ??...
You too.and happy 2008![]()
Bookmarks