Dear All:
I subclass QDialog which includes a QLabel and a QProgressBar.
QLabel is about to show deleting file name and QProgreeBar is for progress.
But Dialog seems to busy if you call QLabel ::setText(),
it'll ok if you call QProgreeBar::setValue();
I doubt "model()->filename(iIdx).filePath()" takes more execution time ...
I use recursive to implement deleting function, for example
int file_recursive_delete(QModelIndex iIdx)
{
// it'll call QLabel ::setText(), but Dialog won't update text until deleting is finished
emit notifyFileNameToProgress( model()->filename(iIdx).fileName() );
// it'll call QProgreeBar::setValue(), and it works....Dialog won't busy....
emit notifyValueToProgress();
// ...... do deleting
}
Bookmarks