标签:
1.往QListView控件内写入数据
strlist=QStringList()
strlist.append(‘hello‘)
strm=QStringListModel(strlist)
self.ui.listView.setModel(strm)
2.QListView加入复选框
self.model = QStandardItemModel(self.ui.listView)
item = QStandardItem(food)
# Add a checkbox to it
item.setCheckable(True)
# Add the item to the model
self.model.appendRow(item)
标签:
原文地址:http://www.cnblogs.com/QUSIR/p/4606196.html