1
0

better waiting dialog, with Qt signals

This commit is contained in:
ThomasV
2014-03-28 17:05:34 +01:00
parent 93ead1a90e
commit c5c1ed11f0
2 changed files with 44 additions and 28 deletions

View File

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