def __init__(self, parent=None):
super(SeqDialog, self).__init__(parent)
layout = QtGui.QVBoxLayout(self)
self.table = QtGui.QTableWidget()
self.table.setWindowTitle('Extension table')
self.setWindowTitle('Extension table')
self.resize(500, 285)
self.table.setColumnCount(5)
self.table.setHorizontalHeaderLabels(('Pos, Color, Preselection, Shortname, Sequence').split(', '))
self.table.horizontalHeader().setStretchLastSection(True)
self.table.resizeColumnsToContents()
layout.addWidget(self.table)
self.buttons = QDialogButtonBox(
QDialogButtonBox.Ok | QDialogButtonBox.Cancel,
Qt.Horizontal, self)
layout.addWidget(self.buttons)
self.buttons.accepted.connect(self.accept)
self.buttons.rejected.connect(self.reject)
评论列表
文章目录