标签:
listview控件与updateText 相关联
self.listview.updateText.connect(self.viewlist)
updateText = QtCore.pyqtSignal(str)
#发送信号
updateText.emit(‘updated list‘)
def viewlist(self):
print ‘view‘
if self.refresh==False:
self.model = QStandardItemModel(self.ui.listView)
for food in listviewdata:
item = QStandardItem(food)
item.setCheckable(True)
self.model.appendRow(item)
标签:
原文地址:http://www.cnblogs.com/QUSIR/p/4606311.html