[PyQt] QTableView selected item signals via QItemSelectionModel
Scott Frankel
frankel at circlesfx.com
Wed Nov 19 22:09:56 GMT 2008
Yes, thank you!
For the record, this works:
self.theSelectionModel = self.theView.selectionModel()
self.connect(self.theSelectionModel,
QtCore.SIGNAL("selectionChanged(QItemSelection, QItemSelection)"),
self.getSelection)
Scott
On Nov 19, 2008, at 1:29 PM, Andreas Pakulat wrote:
> On 19.11.08 12:56:59, Scott Frankel wrote:
>>
>> Hello,
>>
>> What's the proper way to identify which row of a QTableView
>> instance a
>> user may have selected?
>>
>> Pouring through the docs, and web searches, I think I've gotten
>> close by
>> listening for signals from a QItemSelectionModel instance. I'm still
>> missing something though, as my implementation isn't firing
>> "selectionChanged()" signals.
>
> Well, quite simple: The signal has two parameters, so you're connect
> simply
> didn't work. You always need to use the complete signature of the
> signal.
>
> Andreas
>
> --
> Chicken Little was right.
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
Scott Frankel
President/VFX Supervisor
Circle-S Studios
www.circlesfx.com
510-339-7477 (o)
510-332-2990 (c)
More information about the PyQt
mailing list