Show wait cursor when progress dialog is visible

p4#: 22152
This commit is contained in:
Magne Sjaastad
2013-08-13 09:03:40 +02:00
parent cfb81a324b
commit 5c5d53bcee

View File

@@ -21,6 +21,7 @@
#include <QPointer>
#include <QProgressDialog>
#include <QCoreApplication>
#include <QApplication>
#include <QThread>
#include <assert.h>
@@ -56,6 +57,8 @@ namespace caf {
ProgressInfo::ProgressInfo(size_t maxProgressValue, const QString& title)
{
ProgressInfoStatic::start(maxProgressValue, title);
QApplication::setOverrideCursor(QCursor(Qt::WaitCursor));
}
//--------------------------------------------------------------------------------------------------
@@ -64,6 +67,8 @@ ProgressInfo::ProgressInfo(size_t maxProgressValue, const QString& title)
ProgressInfo::~ProgressInfo()
{
ProgressInfoStatic::finished();
QApplication::restoreOverrideCursor();
}
//--------------------------------------------------------------------------------------------------