📜  pyqt5 python如何向表中添加widgtet - Python代码示例

📅  最后修改于: 2022-03-11 14:46:34.391000             🧑  作者: Mango

代码示例1
# initialize a table somehow
table = QTableWidget(parent)
table.setRowCount(1)
table.setColumnCount(1)

# create an cell widget
btn = QPushButton(table)
btn.setText('12/1/12')
table.setCellWidget(0, 0, btn)