[PyQt] Qt4 vs Qt5 QAbstractItemView clicked signal

V. Armando Solé sole at esrf.fr
Wed Oct 28 11:38:14 GMT 2015


I am porting an application from PyQt4 to PyQt5 and I have the following 

The signature of QAbstractItemView.clicked signal is the same:

void QAbstractItemView::clicked(const QModelIndex & index)

but in Qt4 the signal is generated on any mouse button click, while on 
Qt5 the signal is generated only on left click.

Is there a way I can achieve the same behavior?

I can implement mousePressEvent to know the pressed mouse button, but 
that does not give me the QModelIndex.

Thanks for your time,


More information about the PyQt mailing list