PDA

View Full Version : setCursor(Qt::WaitCursor);



fellobo
28th February 2006, 23:38
void dlg::LongFunc()
{
this->setCursor(Qt::WaitCursor);
...
this->setCursor(Qt::ArrowCursor);
}


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!

Chicken Blood Machine
1st March 2006, 03:58
void dlg::LongFunc()
{
this->setCursor(Qt::WaitCursor);
QApplication::processEvents();
...
this->setCursor(Qt::ArrowCursor);
}