Luc4
13th June 2010, 12:31
Hi! I created I loop in which I copy files from a location to a another. When I copy one file, I inform the user of the file name. Unfortunately, it seems that if I inform the user by placing a qDebug output, the string is written correclty, if I use the method append of QTextEdit, nothing is written. I simply have this:
QString filename;
foreach (filename, list) {
// So something.
textEdit->append("Some text describing what I'm doing.");
qDebug("Some text describing what I'm doing.");
QFile file(currentDir.absoluteFilePath(fileName));
file.copy(newPath);
}
In this situation, qDebug writes the sentence in the right place, but textEdit shows nothing of what it should. Maybe the application is too busy to do anything, including writing something? Any way I can do what I need?
Thanks!
QString filename;
foreach (filename, list) {
// So something.
textEdit->append("Some text describing what I'm doing.");
qDebug("Some text describing what I'm doing.");
QFile file(currentDir.absoluteFilePath(fileName));
file.copy(newPath);
}
In this situation, qDebug writes the sentence in the right place, but textEdit shows nothing of what it should. Maybe the application is too busy to do anything, including writing something? Any way I can do what I need?
Thanks!