Qt 如何从QItemSelection中删除索引或范围
我找不到任何类似QItemSelection.remove()或QItemSelection.deselect()的内容。最好的方法是什么?到目前为止,我发现最好的方法是使用第二个选择,将“合并”设置为“取消选择”:Qt 如何从QItemSelection中删除索引或范围,qt,selection,Qt,Selection,我找不到任何类似QItemSelection.remove()或QItemSelection.deselect()的内容。最好的方法是什么?到目前为止,我发现最好的方法是使用第二个选择,将“合并”设置为“取消选择”: deselection = QItemSelection(curr_index, curr_index) # Can I coin deselection? ;) selection.merge(deselection, QItemSelectionModel.Deselect)
deselection = QItemSelection(curr_index, curr_index) # Can I coin deselection? ;)
selection.merge(deselection, QItemSelectionModel.Deselect)