[Qt-interest] QTableView, wrong cell index by position

Josinei Silva josinei_listas at yahoo.com.br
Wed Jan 21 18:32:15 CET 2009


Em Wednesday 21 January 2009 04:26:05 Scott Aron Bloom escreveu:
> > -----Original Message-----
> > From: qt-interest-bounces at trolltech.com [mailto:qt-interest-
> > bounces at trolltech.com] On Behalf Of Josinei Silva
> > Sent: 2009-01-20 21:47
> > To: qt-interest at trolltech.com
> > Subject: [Qt-interest] QTableView, wrong cell index by position
> >
> >
> > The row is always wrong, at row 0, i got row 1 and so on.
> > The column changes at the middle of the column, not at the borders.
> >
> > It looks like QTableView is not considering Horizontal Header and
>
> Vertical
>
> > Header when calculating the index of a postion.
> >
> > I should compensate horizontal header and vertical header manualy or
> > there's a
> > way to tell QTableView to do it?
> >
> > Thanks
> >
> > Josinei R. L. Silva
>
> [Scott Aron Bloom]
> However, IIRC you can also use ToolTipRole in yoru data model and return
> QVariant for all the columsn you don't are about, and return the proper
> text for the index right there...  It's a MUCH cleaner solution
>

It works. Perfectly.

Thanks

Josinei





More information about the Qt-interest-old mailing list