PDA

View Full Version : QTableview dropIndicator for whole row



hvengel
1st November 2011, 00:32
I have a custom table view and model. Logically the selection model is for whole rows but because users also need to be able to individually select a checkbox in one column I am using selectItems for the selectionBehavior. I handle selecting rows in the selectionChanged handler where I also take care of what needs to be done when the user selects the checkbox. For the most part this works nicely but when users select a row and then try to drag/drop it to another location in the table the dropIndicator only shows up in the cell under the mouse pointer. I would like this to show up on all of the cells of the row. Does anyone have any idea how I can get this to happen.

By the way even with a selectionBehavior of selectRows only the cell under the mouse pointer shows the drop indicator.

This is with Qt 4.7 in case it makes a difference.