[Qt-interest] Select dropped item

Alexandre Beraud aberaud at infflux.com
Tue Jan 27 11:16:09 CET 2009


Hi,

I think you'll have to derive the QListView class and re-implement the 
dropEvent() method. Then use
one of the QItemSelectionModel::select() methods.

Maybe there's a more simple way of doing it.

Regards,

Alex


Anthony Serdyukov a écrit :
> Good day, colleagues.
>
> The situation:
> QListView in ListMode.
> QAbstractTableModel-derived model.
> Items are being reordered within list view via drag'n'drop.
>
> The operation works, but how to make dropped item to be selected after
> operation?
> For example, I have moved seventh item to the first position, and I
> want now the first item to be selected. But I still have seventh item
> selected instead.
>
> --
> Regards,
> Anthony
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>   


-- 
BERAUD Alexandre
Ingénieur Développement

Infflux - Informatique & Flux
Tel: 01 49 57 92 00 - Fax : 01 49 57 92 01
Mail: aberaud at infflux.com
Visitez notre site :  www.infflux.com





More information about the Qt-interest-old mailing list