Select row in a WTableView
Added by Eddy Peeters over 11 years ago
Hi,
I'm using the WTableView and I want to select a single row. I expected to use the 'select' function from the WAbstractItemView base class, but this function requires a WModelIndex as input. The row number in the WModelIndex class can't be set.
How can I select a row in a WTableView with the software. I expect the same behaviour as if the user click on this row (change row color, send 'clicked' event, ...)
Thanks,
Eddy
Replies (2)
RE: Select row in a WTableView - Added by Koen Deforche over 11 years ago
Hey Eddy,
A model index is always generated by a model, you need to use model->index().
Regards,
koen
RE: Select row in a WTableView - Added by Eddy Peeters over 11 years ago
Hi Koen,
It's that easy.
Thanks for the very fast answer.
Regards,
Eddy