1
0
This commit is contained in:
ThomasV
2015-04-22 09:56:16 +02:00
parent 2f0f1aafa6
commit fd651709b8
2 changed files with 1 additions and 11 deletions

View File

@@ -126,17 +126,10 @@ class HelpButton(QPushButton):
self.help_text = text
self.setFocusPolicy(Qt.NoFocus)
self.setFixedWidth(20)
self.alt = None
self.clicked.connect(self.onclick)
def set_alt(self, func):
self.alt = func
def onclick(self):
if self.alt:
apply(self.alt)
else:
QMessageBox.information(self, 'Help', self.help_text, 'OK')
QMessageBox.information(self, 'Help', self.help_text, 'OK')
class Buttons(QHBoxLayout):
def __init__(self, *buttons):