Hi all,
I have a custom delegate in a QListView and am trying to figure out how
to make single click into the editor effect the view's selection model
the same way as a click on an item that is not in editing mode.
I am currently trying this in the view's mousePressEvent():
def mousePressEvent(self, event):
index = self.indexAt(event.pos())
self.selectionModel().select(index,
QtGui.QItemSelectionModel.SelectCurrent)
super(ElementView, self).mousePressEvent(event)
This selects the underlying index but it does not effect the selection
according to the view's selectionMode, i.e. it does not extend the
existing selection as expected.
I thought that's what the QtGui.QItemSelectionModel.SelectCurrent flag
was for, but it doesn't seem to work that way.
Any ideas?
Cheers,
frank
--
ohufxLogo 50x50 <http://www.ohufx.com> *vfx compositing
<http://ohufx.com/index.php/vfx-compositing> | *workflow customisation
and consulting <http://ohufx.com/index.php/vfx-customising>* *
_______________________________________________
PySide mailing list
PySide@qt-project.org
http://lists.qt-project.org/mailman/listinfo/pyside