self.acceptButton.setText("Accept")
self.cancelButton.setText("Cancel")
buttonGridLayout.addWidget(self.acceptButton, 0, 0, Qt.AlignLeft)
buttonGridLayout.addWidget(self.cancelButton, 0, 1, Qt.AlignLeft)
gridLayout.addWidget(self.labelTable, 0, 0)
gridLayout.addWidget(self.displayText, 1, 0)
gridLayout.addLayout(buttonGridLayout, 2, 0)
self.setLayout(gridLayout)
labels << "Type" << "Name"
self.labelTable.setHorizontalHeaderLabels(labels)
self.displayText = QTextEdit(self)
self.labelTable = QTableWidget(1, 2, self)
self.acceptButton = QPushButton(self)
self.acceptButton.setText("Accept")
self.cancelButton = QPushButton(self)
self.cancelButton.setText("Cancel")
buttonGridLayout = QGridLayout()
buttonGridLayout.addWidget(self.acceptButton, 0, 0, Qt.AlignLeft)
buttonGridLayout.addWidget(self.cancelButton, 0, 1, Qt.AlignLeft)
gridLayout = QGridLayout()
gridLayout.addWidget(self.labelTable, 0, 0)
gridLayout.addWidget(self.displayText, 1, 0)
gridLayout.addLayout(buttonGridLayout, 2, 0)
self.setLayout(gridLayout)
labels = QStringList()
labels << "Type" << "Name"
self.labelTable.setHorizontalHeaderLabels(labels)
To copy to clipboard, switch view to plain text mode
Bookmarks