我想创建一个列表,此列表中的每一行包含:
LineNo | Edit Model | Model Select | Log enabl | freq | selection |
1 | QPushButton | QComboBox | QCheckBox | QLineEdit | QLineEdit |
2 | QPushButton | QComboBox | QCheckBox | QLineEdit | QLineEdit |
3 | QPushButton | QComboBox | QCheckBox | QLineEdit | QLineEdit |
| | | | | | |
n | QPushButton | QComboBox | QCheckBox | QLineEdit | QLineEdit |
Run Code Online (Sandbox Code Playgroud)
这个列表是动态的,我总共有36个模型,但是根据已经做出的选择,只能选择这些模型.用户可以后悔任何先前的选择并重新绘制此列表.
我一直在看QListView,QTableWidget,Delegates,但我似乎无法找到关于如何将QPushButton实现到QListView或QTableWidget的任何示例或问题.查看QItemDeligate QPushButton的文档不属于可接受的类型.