PDA

View Full Version : QAbstractItemModel with rowSpan?



joeld42
4th February 2009, 18:53
I'm writing something using a QAbstractItemModel that has nested tables. I would like to be able to have certain rows be "title rows", basically have a line of text across the whole row.

I noticed this function:


QSize span( const QModelIndex &index ) const;

Which looks like what I want. Unfortunately the docs tell me this is not currently implemented. I tried it anyways, and this function never got called, so the docs appear to be telling the truth.

I'm using Qt 4.3.4, btw.

So.. is this in 4.5? Or might this be implemented soon? If not, I'll probably also end up making my own QTreeView and drawing it myself.. is that the best way to do that?

I really like the new model/view design in QAbstractItemView, but this seems like a pretty basic thing to leave out.