Results 1 to 2 of 2

Thread: setWindowTitle

  1. #1
    Join Date
    Dec 2007
    Location
    Groningen Netherlands
    Posts
    182
    Thanks
    16
    Thanked 2 Times in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default setWindowTitle

    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:

    Qt Code:
    1. QDir map = QDir(inpath, "*.asf *.avi *.mov *.mp4 *.mpg *.rm *.wmv");
    2. QStringList fileList = map.entryList();
    3. int num = fileList.size();
    4. for (int i = 0; i < num; i++)
    5. {
    6. setWindowTitle(fileList[i]);
    7. QString oldname = QString("%1%2").arg(inpath).arg(fileList[i]);
    8. QString newname = QString("%1%2").arg(pixpath).arg(fileList[i]);
    9. map.rename(oldname, newname);
    10. }
    To copy to clipboard, switch view to plain text mode 

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,360
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: setWindowTitle

    Qt Code:
    1. qApp->processEvents();
    To copy to clipboard, switch view to plain text mode 

  3. The following user says thank you to wysota for this useful post:

    JeanC (19th January 2008)

Similar Threads

  1. setWindowTitle and last compile date/time
    By jcr in forum Qt Programming
    Replies: 1
    Last Post: 8th April 2006, 23:59
  2. setWindowTitle() with nice font
    By Dwarf007 in forum Qt Programming
    Replies: 15
    Last Post: 19th March 2006, 15:31
  3. QtSingleApplication
    By mule in forum Qt Programming
    Replies: 8
    Last Post: 28th February 2006, 19:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.