[Qt-interest] Catching row changes of QListView

Giuseppe D'Angelo dangelog at gmail.com
Sat May 14 15:18:00 CEST 2011


On Sat, May 14, 2011 at 2:17 PM, Robert Hairgrove <evorgriahr at hispeed.ch> 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.
>
> 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?

See the QItemSelectionModel signals. Use view->selectionModel() to get
the current selection model.



-- 
Giuseppe D'Angelo



More information about the Qt-interest-old mailing list