Results 1 to 2 of 2

Thread: setCursor(Qt::WaitCursor);

  1. #1
    Join Date
    Feb 2006
    Posts
    27
    Thanks
    4
    Qt products
    Qt4
    Platforms
    Windows

    Default setCursor(Qt::WaitCursor);

    Qt Code:
    1. void dlg::LongFunc()
    2. {
    3. this->setCursor(Qt::WaitCursor);
    4. ...
    5. this->setCursor(Qt::ArrowCursor);
    6. }
    To copy to clipboard, switch view to plain text mode 

    I expect this to change my cursor to waiting for the whole dialog box after the function is finished it changes it back to the arrow cursor. This isn't want it does (in fact nothing changes.)

    What must I do to have a wait cursor appear for the dialog while in a dialog function?

    Thanks for the help QT gurus!

  2. #2
    Join Date
    Jan 2006
    Location
    Mountain View, CA
    Posts
    279
    Thanked 42 Times in 37 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: setCursor(Qt::WaitCursor);

    Qt Code:
    1. void dlg::LongFunc()
    2. {
    3. this->setCursor(Qt::WaitCursor);
    4. QApplication::processEvents();
    5. ...
    6. this->setCursor(Qt::ArrowCursor);
    7. }
    To copy to clipboard, switch view to plain text mode 
    Save yourself some pain. Learn C++ before learning Qt.

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.