[Solved]How can I change the mouse cursor to busy state ?
-
Hi,
Its quite simple, I got a settings dialog using a QWizard. When changing from the first page to the second, building the second page might take some time. Displaying a status bar is not possible because I don't know beforehand how long it might take, so I was thinking to change the mouse cursor to Qt::WaitCursor like this:
@void MyWizard::handlePageChanged(int a_pageId)
{
switch(a_pageId)
{
case WIZARD_PAGE::Page_Intro: break;
case WIZARD_PAGE::Page_Table: QApplication::overrideCursor()->setShape(Qt::WaitCursor);
fillTableItemsList();
m_pTable->setModel(m_pFilterProxy);
QApplication::overrideCursor()->setShape(Qt::ArrowCursor);
break;
case WIZARD_PAGE::Page_Result: break;
}
}@
But that didn't work. Has anyone got an idea how to achieve this, maybe an event I can post or a static call?EDIT: Kind of solved it myself. I'm now using @QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));@
and @QApplication::restoreOverrideCursor();@But the cursor isn't spinning. Does anyone know how to achieve this?