schapman1974
7th May 2013, 16:41
I have subclassed the QAbstractItemView as the model for my qtableview. And I want to add the ability to move
rows around in the Table. I did setMovable and it does allow me to move the rows. I also have multiselect activated
on the tableview so I can select multiple rows.
However I have no way of moving multiple rows. I would like to be able to select multiple rows using the ctrl key
and then have the mousemove event move the selected rows up or down.
I have searched for a solution to this and thus far the only two things that seem to make sense is that possibly
in a different selection mode I could possibly make the drag feature work. Or I would need to reimplement
the mousepress and the mousemove events in my table.
I am not sure what will work and what to put in the reimplemented events if that were what I needed to do.
Thank you
rows around in the Table. I did setMovable and it does allow me to move the rows. I also have multiselect activated
on the tableview so I can select multiple rows.
However I have no way of moving multiple rows. I would like to be able to select multiple rows using the ctrl key
and then have the mousemove event move the selected rows up or down.
I have searched for a solution to this and thus far the only two things that seem to make sense is that possibly
in a different selection mode I could possibly make the drag feature work. Or I would need to reimplement
the mousepress and the mousemove events in my table.
I am not sure what will work and what to put in the reimplemented events if that were what I needed to do.
Thank you