PDA

View Full Version : setWindowTitle



JeanC
19th January 2008, 10:27
Good day,

I am moving (QDir::rename()) a bunch of files and would like the windowTitle display the name of each file as it's being moved, like this:



QDir map = QDir(inpath, "*.asf *.avi *.mov *.mp4 *.mpg *.rm *.wmv");
QStringList fileList = map.entryList();
int num = fileList.size();
for (int i = 0; i < num; i++)
{
setWindowTitle(fileList[i]);
QString oldname = QString("%1%2").arg(inpath).arg(fileList[i]);
QString newname = QString("%1%2").arg(pixpath).arg(fileList[i]);
map.rename(oldname, newname);
}


But that title does not get set. In the borland days you did something called Application->ProcessMessages to get the main thread update is paint events, how do you do that in Qt?

Thanks, happy coding.

wysota
19th January 2008, 11:01
qApp->processEvents();