In my loadDatabase function, I have clearly set the status to display the message "loading coverage database..." before setOverrideCursor(Qt::WaitCursor)
, but the status bar is only displaying the message after restoreOverrideCursor()
is called. I have tried various ways to display the message before setOverrideCursor(Qt::WaitCursor)
, but I'm unsure of the reason behind this behavior.
void loadDatabase(const QString &name) {
//setting statusBar's message
statusBar()->showMessage("loading coverage database...");
QApplication::setOverrideCursor(Qt::WaitCursor);
//loading the database and setting up the GUI are CPU-intensive operations.
m_logger_widget->clear();
m_logger_widget->info("opening database %s", name.toStdString().data());
auto coverage_database = new CoverageDatabase(name, m_logger_widget);
m_instance_view->setModel(coverage_database->getInstanceModel());
QApplication::restoreOverrideCursor();
}
I hope to identify the reason why "loading coverage database..." is not displayed and to have it shown before setting the WaitCursor.