Re: how to make program wait
You can't wait in a Qt program, because Qt is event-driven. Event loop must be running, so that GUI can be redrawn.
In your situation the easiest solution is IMO to implement a single iteration of sorting algorithm in a slot and connect that slot to the QTimer::timeout() signal. This way you can control the time between iterations and even implement single-stepping.
Re: how to make program wait
Well you could make the function in your class that calls the update() a slot and instead of calling it manually use a QTimer.. See here:
http://doc.trolltech.com/4.1/qtimer.html
EDIT:
Don't you hate it when you post just about the same response as someone else at the same time.. O-Well...
Re: how to make program wait
Quote:
Originally Posted by michael
Don't you hate it when you post just about the same response as someone else at the same time.. O-Well...
I posted about this here