[Qt-interest] error in moc file

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Thu Mar 18 10:24:53 CET 2010


Ramesh wrote on Thursday, March 18, 2010 9:48 AM:

> ...
> When the selection of items in the listview gets changed I want to
> get the "selectionchange" event to come.. 
> 
> So how can I achieve this.. pls tell me in brief...

Inherit from http://doc.trolltech.com/4.6/qabstractitemview.html (or QListView) and overwrite the setSelection method (and possibly other methods which change the selection). Then send your custom signal "selectionChanged" in all these cases. Easy.

Cheers, Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list