diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-12-04 15:51:01 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2013-12-04 15:52:21 +0200 |
commit | fc06a69c436f266f74bbdd141f508e1063ca7ba9 (patch) | |
tree | d300e8b1be4ea556156a84300186b77e085fdf8d /qt-ui/printdialog.cpp | |
parent | e4f35fb51a549ed666728eaa947728686a415ac9 (diff) | |
download | subsurface-fc06a69c436f266f74bbdd141f508e1063ca7ba9.tar.gz |
PrintDialog: reset the progress bar each time the dialog opens
This requires us to expose the progressBar as a private
class member.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Diffstat (limited to 'qt-ui/printdialog.cpp')
-rw-r--r-- | qt-ui/printdialog.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-ui/printdialog.cpp b/qt-ui/printdialog.cpp index 48c5a5619..e029ff09b 100644 --- a/qt-ui/printdialog.cpp +++ b/qt-ui/printdialog.cpp @@ -48,7 +48,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) connect(closeButton, SIGNAL(clicked(bool)), this, SLOT(closeClicked())); hLayout->addWidget(closeButton); - QProgressBar *progressBar = new QProgressBar(); + progressBar = new QProgressBar(); connect(printLayout, SIGNAL(signalProgress(int)), progressBar, SLOT(setValue(int))); progressBar->setMinimum(0); progressBar->setMaximum(100); @@ -64,6 +64,7 @@ PrintDialog::PrintDialog(QWidget *parent, Qt::WindowFlags f) void PrintDialog::runDialog() { + progressBar->setValue(0); exec(); } |