QThread and GUI
Hey,
Is there a way to update the GUI from within a QThread? The QThread::start() method doesn't accept arguments, like a pointer to a QProgressBar, so how do you feedback thread specific information to the GUI? To be more exact, I have a QThread that counts, using a small for- loop, and I'd like a QLabel on my form to display the current value of the counter. Any short code sample for me? Anyone? Manu |
Progress
I got my class to multiple inherit from QObject and QThread at the same time and emit a signal to the GUI class. This passes the value of my counter to the slot that updates the QLabel, the only problem is that it's slow as Hell, and that's not exactely the point of multithreading...
Any idea what I'm doing wrong? Emitting too many signals too often? Manu PS: Just found it, I had a "sleep(1);" in there causing the thread to pause for one second very often. |
All times are GMT -5. The time now is 05:48 AM. |