I am trying to scan files and its sub directory , the code from Qt Examples works absolutely fine and displays data with QDebug() . However when i try to it.next() data to a Qlable or textEdit widget , it doesn't show the data in realtime. The data is reflected after the it.hasNext() gets completed. I want to show real time scanning status in the textedit box - Self is new to Qt.
How to show the status for the file being scanned in real time, in the Qt textEdit widget ?
Code is given below .
void MainWindow::findFilesRecursively(QDir rootDir) {
QDirIterator it(rootDir, QDirIterator::Subdirectories);
while(it.hasNext()) {
qDebug() << it.next();
// ui->textEdit->append(it.next()); <<<<<<---- This is note getting updated realtime,
Data get populated after the scan in complted.
}
}