def __init__(self, parent=None): super(ScriptWidget, self).__init__(parent) self.scriptLayout = QHBoxLayout() self.scriptFileLabel = QLabel(self) self.scriptFileLabel.setText("Script to run:") self.scriptFileLineEdit = QLineEdit(self) self.scriptFileButton = QPushButton(self) self.scriptFileButton.setText("Browse") self.scriptLayout.addWidget(self.scriptFileLabel) self.scriptLayout.addWidget(self.scriptFileLineEdit) self.scriptLayout.addWidget(self.scriptFileButton) self.setLayout(self.scriptLayout) self.scriptFileLineEdit.setText(IOTool.get_script_name()) self.scriptFileButton.clicked.connect(self.on_scriptFileButton_clicked)
def __init__(self, parent=None): super(ScriptWidget, self).__init__(parent) self.scriptLayout = QHBoxLayout() self.scriptFileLabel = QLabel(self) self.scriptFileLabel.setText("Script to run:") self.scriptFileLineEdit = QLineEdit(self) self.scriptFileButton = QPushButton(self) self.scriptFileButton.setText("Browse") self.scriptLayout.addWidget(self.scriptFileLabel) self.scriptLayout.addWidget(self.scriptFileLineEdit) self.scriptLayout.addWidget(self.scriptFileButton) self.setLayout(self.scriptLayout) self.scriptFileLineEdit.setText(IOTool.get_script_name()) # make the magic function names/decorators work! # self.retranslateUi(StartWidget) self.connect(self.scriptFileButton, SIGNAL('clicked()'), self.on_scriptFileButton_clicked)