[Qt-interest] Catching row changes of QListView
Andreas Pakulat
apaku at gmx.de
Sat May 14 22:43:57 CEST 2011
On 14.05.11 14:17:36, Robert Hairgrove wrote:
> There is a protected signal "selectionChanged(...)" of QAbstractItemView
> which would be nice to connect to a slot in order to update some other
> controls in a data input form I am creating.
No there's not. There's a protected slot which subclasses can use but
you can't connect to that anyway.
On the other hand, all signals declared are protected functions (thats
what the signals macro does) and you can still connect to it...
> Unfortunately, QListView doesn't seem to provide any mechanism for
> detecting the user's change of selection. Do I need to subclass
> QListView in order to connect with this signal, or is there a better (or
> easier) way?
As was already said, use the itemselection model, that supplies you with
all modification information.
Andreas
More information about the Qt-interest-old
mailing list