From bac2c8175c5df0b1b7fb9a7d5091a659d886b3eb Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 28 Apr 2014 16:06:59 +0200 Subject: [PATCH] optional icon in installwizard question --- gui/qt/installwizard.py | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/gui/qt/installwizard.py b/gui/qt/installwizard.py index 1c3c8eb5b..314af07aa 100644 --- a/gui/qt/installwizard.py +++ b/gui/qt/installwizard.py @@ -194,20 +194,29 @@ class InstallWizard(QDialog): return - def show_message(self, msg): + def show_message(self, msg, icon=None): vbox = QVBoxLayout() + self.set_layout(vbox) + if icon: + logo = QLabel() + logo.setPixmap(icon) + vbox.addWidget(logo) vbox.addWidget(QLabel(msg)) vbox.addStretch(1) vbox.addLayout(close_button(self, _('Next'))) - self.set_layout(vbox) if not self.exec_(): return None - def question(self, msg): + + def question(self, msg, icon=None): vbox = QVBoxLayout() + self.set_layout(vbox) + if icon: + logo = QLabel() + logo.setPixmap(icon) + vbox.addWidget(logo) vbox.addWidget(QLabel(msg)) vbox.addStretch(1) - self.set_layout(vbox) vbox.addLayout(ok_cancel_buttons(self, _('OK'))) if not self.exec_(): return None