Re: Implementing threads...
A non-finishing progress bar is better in this case... Unless the external process notifies you in some way of the compile progress there's no way to know.
What you did there doesn't make any sense... You are just killing the event loop with that for loop, especially if the file is very big.
Therefore try with a non finishing progress bar and you're set.
Re: Implementing threads...
Quote:
Originally Posted by
marcel
A non-finishing progress bar is better in this case...
what do you mean by non-fishing?
Re: Implementing threads...
Please let me know what you mean by a non-finishing progress bar.
Re: Implementing threads...
I mean a QProgressBar where minimum value = maximum value = 0.
Re: Implementing threads...
I mean a progress bar that doesn't fish :)
Quote:
Originally Posted by
triperzonak
what do you mean by non-fishing?
Re: Implementing threads...
I tried the non-finishing progress bar but it's just not showing in Linux.
I am trying to have the progress bar in the status bar depicting the progress of the compile process. But I am not able to view this non-finishing progress bar when compile button is hit. The same thing is working in Windows but not in Linux.
Re: Implementing threads...
It looks like paint events for progress bar are cached and are not processed because system is busy with other task (compiling), that's why you don't see progress bar.
You can try to invoke method repaint() or QApplication::flush() or QApplication::processEvents() like:
progressBar.setValue(i);
progressBar.repaint();
QApplication::flush();//this line is probably not necessary
See Qt help for QCoreApplication::flush() method.