[QUOTE=rgkovach123;27516]what do you want to happen when the user clicks on items? Right-click does nothing? Left-click does something in addition to selecting the item?
there are multiple concepts to wrap your head around. Overriding Events, connecting Signals, finding the item under the mouse, etc.[/QUOTE]
I currently have this
self.list = QtGui.QListView()
self.list.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
self.list.customContextMenuRequested.connect(self.listContextMenuRequested)
self.list.mouseReleaseEvent = self.mouseClicked
def mouseClicked(self, e):
# Here I need to check if it was a left click, and if it was I also need to check if the item in the list was actually clicked
I would use the clicked signal wich gives me back the model of the clicked item but problem with clicked signal is that it also registers right click (and middle click and what not) and this ruins the flow because when the user right clicks on the item it registers as left click and it opens the context menu at the same time.
All I need is to filter out the left clicks that did not occur over the actual item in the QListView.