View Full Version : How can i prozess a slot function partially before moving on?

19th December 2008, 10:14

Sorry for the bad title... but i dont know how to describe my problem properly in a few words.

I Have a slot function in my QWidget derived class:

void TrackWindow::createMask() {
cout("Building mask..."); //writes some text on a QTextEdit
bee_radar->createMask(); // processes some Image Data
cout("Mask created.");

If i call that slot by a Signal, it processes all the steps, and then displays the text at once. But i want to send "Building Mask" to my QTextEdit WIdget first,display it, and then process the other steps. How can i do that? :)

Thanks for your help!

19th December 2008, 13:06
You could try if QCoreApplication::processEvents solves your problem. Add a call to this method after you sent the text to your widget, and before doing the other stuff. This should give Qt a chance to update the widgets before you continue with your task.

19th December 2008, 15:57
thanks! works perfectly! :)