views:

32

answers:

1

basically i want to remove item from Qtreeview on the dropEvent(QDropEvent *event) inherited in a qtreeview subclass. what is the best way to do this?

+1  A: 

You can get to the model with http://doc.trolltech.com/4.7/qabstractitemview.html#model method. You can get index under current mouse pos with http://doc.trolltech.com/4.7/qabstractitemview.html#indexAt method. At the end you can use http://doc.trolltech.com/4.7/qabstractitemmodel.html#removeRow to remove desired index

Kamil Klimek