Hi,<div><br></div><div>I'm trying to create a custom table which pops up a menu when the user right clicks. This part works ok. It looks like this:</div><div><br></div><div><div>class Table(QtGui.QTableWidget):</div><div>
def __init__(self, parent, gui):</div><div> QtGui.QTableWidget.__init__(self, parent)</div><div> self.gui = gui</div><div><br></div><div><div> def mouseReleaseEvent(self, event):</div><div> if event.button() == QtCore.Qt.RightButton:</div>
<div> self.rightClickMenu(event)</div><div> </div><div> </div><div> def rightClickMenu(self, event):</div><div> pos = event.pos</div><div> self.gui.ui.menuEdit.popup(QtGui.QCursor.pos())</div>
<div><br></div><div><br></div><div>The problem is that the default before of left click is changed, and I can't reset it. Without the mods the left clicks acts where if a multiple selection is made then clicking on another table cell de-selects all the previous items (unless a modifier key is used). With the above method, once multiple selections are made then it basically goes into <shift> mode and all previous selections are kept. I can't figure out a way to turn that off.</div>
<div><br></div><div>Is there a way to cherry pick which mouse events you want and ignore the rest, basically letting them keep their default behavior? Because it looks like once the function is taken over then the default behaviors are lost.</div>
<div><br></div><div>Thanks,</div><div>Marc</div></div></div>