Items disappears from combo box when I read them from model
问题 I have QComboBox and I set QStandardItemModel because I need multi-select check-boxes in it. Problem is that when I read text value and check state of items in comboBox, they disappear from combo. This is how I set model to comboBox: areas = ["Area one", "Area two", "Area three", "Area four"] model = QtGui.QStandardItemModel(4, 1)# 4 rows, 1 col for i,area in enumerate(areas): item = QtGui.QStandardItem(area) item.setFlags(QtCore.Qt.ItemIsUserCheckable | QtCore.Qt.ItemIsEnabled) item.setData