PDA

View Full Version : QProcess issues



oguzy
13th September 2008, 14:08
Here is the code i am working on. http://rafb.net/p/ZZvzwR89.html

I know it is not a professional one but i am just learning and trying to figure out things to do the better ones.

The problem is about the QProcess. There are 3 pages at the QWizard and when the user enters the Page3 the run() is executed. run() calls some functions that run some scripts at the background. At the end of each function i am updating the progress bar. To test the code i just enabled three functions. I was hoping to see that the gui will be updated at the end of the prepare.sh script end while it is being executed. But cleanTheFiles and reboot functions also traversed so the progress bar showed %100. So it seems i am missing something. Will be happy if someone help me.

triperzonak
13th September 2008, 15:15
try
QCoreApplication::processEvents() (http://http://doc.trolltech.com/4.4/qcoreapplication.html#processEvents-2)

or you can use qthread (http://doc.trolltech.com/4.4/qthread.html)