1
0

install wizard: use a single window

This commit is contained in:
thomasv
2013-09-12 19:42:00 +02:00
parent ee08b2bfa6
commit eafdb42475
4 changed files with 208 additions and 163 deletions

View File

@@ -23,25 +23,28 @@ class EnterButton(QPushButton):
apply(self.func,())
def waiting_dialog(f):
def waiting_dialog(f, w=None):
s = Timer()
s.start()
w = QDialog()
w.resize(200, 70)
w.setWindowTitle('Electrum')
if not w:
w = QDialog()
w.resize(200, 70)
w.setWindowTitle('Electrum')
else:
if w.layout(): QWidget().setLayout(w.layout())
l = QLabel('')
vbox = QVBoxLayout()
vbox = QVBoxLayout(w)
vbox.addWidget(l)
w.setLayout(vbox)
w.show()
def ff():
s = f()
if s: l.setText(s)
else: w.close()
else: w.accept()
w.connect(s, SIGNAL('timersignal'), ff)
w.exec_()
w.destroy()
#w.destroy()
class HelpButton(QPushButton):