I'm using :<br> Python 2.6<br> Qt 4.5.0<br> PyQt 4.4.4<br>on a Fedora 11<br><br>I'm trying to use both clicked and doubleClicked events on a QTableView.<br>This is the code:<br><br>
QtGui.QTableView.__init__(self, wdg)<br> self.setSelectionMode(QtGui.QAbstractItemView.SingleSelection)<br> self.setSelectionBehavior(QtGui.QAbstractItemView.SelectItems)<br> self.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)<br>
self.connect(self, QtCore.SIGNAL("doubleClicked(const QModelIndex &)"), <br> self.OnItemDoubleClicked)<br> self.connect(self, QtCore.SIGNAL("clicked(const QModelIndex &)"), <br>
self.OnItemClicked)<br><br>I can get only the 'clicked' event to work, but if I comment the second connect (the 'clicked' one) I get the 'doubleClicked' event to work.<br>It seems that they can't work together.<br>
<br>I found similar problems on the net (<a href="http://www.qtcentre.org/forum/p-qtableview-doubleclicked-event-not-working-post95980/postcount7.html">http://www.qtcentre.org/forum/p-qtableview-doubleclicked-event-not-working-post95980/postcount7.html</a>) but no solution at all.<br>
<br>Thanks in advance for your help.<br>ciao<br>Licia<br>