def setup_widget(self): """Setup workspace selector widget""" self.label = QLabel() self.line_edit = QLineEdit() self.line_edit.setAlignment(Qt.AlignRight) self.line_edit.setReadOnly(True) #self.line_edit.setDisabled(True) self.browse_btn = QPushButton(get_std_icon('DirOpenIcon'), "", self) self.browse_btn.setToolTip(self.TITLE) self.connect(self.browse_btn, SIGNAL("clicked()"), self.select_directory) layout = QHBoxLayout() layout.addWidget(self.label) layout.addWidget(self.line_edit) layout.addWidget(self.browse_btn) layout.setContentsMargins(0, 0, 0, 0) self.setLayout(layout)
def _add_table(self, table, title, icon): """Add table tab to main tab widget, return button layout""" widget = QWidget() tabvlayout = QVBoxLayout() widget.setLayout(tabvlayout) tabvlayout.addWidget(table) btn_layout = QHBoxLayout() tabvlayout.addLayout(btn_layout) self.tabwidget.addTab(widget, icon, title) return btn_layout
def setup_widget(self): """Setup workspace selector widget""" self.label = QLabel() self.line_edit = QLineEdit() self.line_edit.setAlignment(Qt.AlignRight) self.line_edit.setReadOnly(True) # self.line_edit.setDisabled(True) self.browse_btn = QPushButton(get_std_icon("DirOpenIcon"), "", self) self.browse_btn.setToolTip(self.TITLE) self.connect(self.browse_btn, SIGNAL("clicked()"), self.select_directory) layout = QHBoxLayout() layout.addWidget(self.label) layout.addWidget(self.line_edit) layout.addWidget(self.browse_btn) layout.setContentsMargins(0, 0, 0, 0) self.setLayout(layout)