python QtableWidget设置单元格双击弹出spinBox
使用QItemDelegate在表视图中设置spinBox控件
参考文章:
PyQt - 如何使用QItemDelegate在表视图中设置QComboBox
QT Spin Box Delegate Example 看看看~
效果图
代码
步骤1:
from PyQt5.QtWidgets import QItemDelegate, QSpinBox
步骤2:
# 设置表格的第二列双击弹出SpinBox控件
self.tableWidget.setItemDelegateForColumn(1, S
原创
2020-12-22 19:26:42 ·
1755 阅读 ·
0 评论