How to make a custom QStyledItemDelegate selectable in a QListView in PySide/PyQt?
问题 As a follow-up to my previous question, which was solved, I now want to make the items selectable . As mentioned earlier, I activated all kinds of selection-related parameters in the view and I also return core.Qt.ItemIsSelectable in the flags -method of the model. But still option.state & gui.QStyle.State_Selected is never fullfilled. Any help is highly appreciated. Please also note the minimal example in the linked question. 回答1: I solved it myself. The problem was, that the custom