I have a class that inherits from QMainWindow called CMainForm.
I have a menu action that triggers a method called menuPackageLogs().
At the begining of the method I set the cursor to Qt::WaitCursor, and at the end I set it back to Qt::ArrowCursor. In between I call a routine that blocks for a while. The problem is that my cursor never changes. It is always an arrow, never an hour glass.
I must be missing something fundemental here.
Here is an example of the method that gets called:
void CMainForm::menuPackageLogs()
{
// Change cursor to wait cursor
setCursor
(QCursor(Qt
::WaitCursor));
bool bRet = UpgradeUtils::PackageLogs();
// Change cursor back to standard arrow
setCursor
(QCursor(Qt
::ArrowCursor));
if (bRet == true)
{
"Upgrade log files successfully packaged.");
}
else
{
"Could not package Upgrade log files.");
}
}
void CMainForm::menuPackageLogs()
{
// Change cursor to wait cursor
setCursor(QCursor(Qt::WaitCursor));
bool bRet = UpgradeUtils::PackageLogs();
// Change cursor back to standard arrow
setCursor(QCursor(Qt::ArrowCursor));
if (bRet == true)
{
QMessageBox::warning(this, tr("Package Logs"),
"Upgrade log files successfully packaged.");
}
else
{
QMessageBox::warning(this, tr("Package Logs"),
"Could not package Upgrade log files.");
}
}
To copy to clipboard, switch view to plain text mode
If anyone has any ideas, I am all ears. Thanks.
Bookmarks