|
|
@ -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): |
|
|
|