Hello,
I think you can try to reimplement:
 
QAbstractItemView::mouseReleaseEvent(QMouseEvent * event)
then, get mouse position with event.pos()
then get corresponding index with view.indexAt(pos)
 
For example:
 
class MyView(QTreeView):
...
  def mouseReleaseEvent(event):
    idx = self.indexAt(event.pos())
Does-it solve your problem ? I am not sure to understand well your question.
 
Sincerly,
Guillaume B
 
Envoyé: mercredi 8 juillet 2015 à 17:16
De: "marc.poi...@onera.fr" <marc.poi...@onera.fr>
À: PySide@qt-project.org
Objet: [PySide] released slot

I can find the pressed(QModelIndex) slot in the QTreeView, but no released(QModelIndex).

I want my item to be actually select'ed when the user stops moving its mouse around with the button down and get the last index the pointer was on.
Is there any other way to do that without the released slot?

-MP-

--
-- ----------------------------------------------------------------------------
-- Marc POINOT [ONERA/DSNA] Tel:+33.1.46.73.42.84 Fax:+33.1.46.73.41.66
-- Avertissement/disclaimer http://www.onera.fr/en/emails-terms
-- ----------------------------------------------------------------------------
--

_______________________________________________
PySide mailing list
PySide@qt-project.org
http://lists.qt-project.org/mailman/listinfo/pyside
_______________________________________________
PySide mailing list
PySide@qt-project.org
http://lists.qt-project.org/mailman/listinfo/pyside

Reply via email to