I have two QListWidget items:
The bad list, we can only select one item.
self.badList = QtGui.QListWidget()
self.badList.setEditTriggers(QtGui.QAbstractItemView.DoubleClicked)
self.badList.itemSelectionChanged.connect(self.functionToCall1)
self.badList.itemChanged.connect(self.functionToCall2)
The other, i can select many items on it
self.badList.setSelectionMode(QtGui.QAbstractItemView.ExtendedSelection)
self.goodList.itemSelectionChanged.connect(self.functionToCall3)
FunctionToCall2 is called when doubleclicking an item and renaming it, then hitting enter.
Obviously the selectionMode is the problem here. Extended selection allows me to unselect all items when clicking outside all of them in empty space. But if selection is SingleSelection by default, like in the badList, i CAN'T unselect all items clicking outside.
How can I make this possible?