diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-22 21:32:51 +0300 |
---|---|---|
committer | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2021-05-22 22:04:27 +0300 |
commit | 4935ac583bbdc289dd31a1caae3d711edef742b6 (patch) | |
tree | eebabb6c2aaafc55893c5f35ea00c35b29bb8839 /src/qt/walletcontroller.cpp | |
parent | 75850106aeecfed1d2dc16d8a67ec210c5826a47 (diff) | |
download | bitcoin-4935ac583bbdc289dd31a1caae3d711edef742b6.tar.xz |
qt: Improve GUI responsiveness
QProgressDialog estimates the time the operation will take (based on
time for steps), and only shows itself if that estimate is beyond
minimumDuration. The default minimumDuration value is 4 seconds, and it
could make users think that the GUI is frozen.
Diffstat (limited to 'src/qt/walletcontroller.cpp')
-rw-r--r-- | src/qt/walletcontroller.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/qt/walletcontroller.cpp b/src/qt/walletcontroller.cpp index c152689f0b..aa26a01541 100644 --- a/src/qt/walletcontroller.cpp +++ b/src/qt/walletcontroller.cpp @@ -207,6 +207,9 @@ void WalletControllerActivity::showProgressDialog(const QString& label_text) m_progress_dialog->setCancelButton(nullptr); m_progress_dialog->setWindowModality(Qt::ApplicationModal); GUIUtil::PolishProgressDialog(m_progress_dialog); + // The setValue call forces QProgressDialog to start the internal duration estimation. + // See details in https://bugreports.qt.io/browse/QTBUG-47042. + m_progress_dialog->setValue(0); } void WalletControllerActivity::destroyProgressDialog() |