Hello everyone,
I'm working with a function that, for instance, does some task it it's own thread and takes the address of an int for progress. Like so:
void doSometing(int* progress)
So, While the function is off running, I need an efficient way to check the progress for completion so that I may process the next item. I was doing something like this:
Qt Code:
while(progress < 100) { progressBar->value = progress }To copy to clipboard, switch view to plain text mode
That just seems like a bit much. But if I only check it every, say, 10 seconds, I could conceivably be wasting 9 seconds for every item. So, is there an accepted way to do something like this?
Thanks for your time,
Backslash
Bookmarks