[Qt-interest] QTableView and delegate
Wolfgang Pausch
Wolfgang.Pausch at uibk.ac.at
Fri Nov 6 21:37:52 CET 2009
Hello,
> Delegates also work when just rendering the data. I am using that at
> several places in my code. Just reimplement the
> QAbstractItemDelegate::sizeHint() and QAbstractItemDelegate::paint()
> methods. It is to be expected that the *editor* is not used for display
> purposes... That would make for very heavy item views when you have a
> lot of data in your view.
Ok. Sounds good. However, I just want to exchange the data the table should
display, not the way how some string (5, "foo", etc.) is rendered. So, when
reimplementing the paint method, conceptionally I would just need to call the
usual paint method of the table, with exchanged data. But how?
Can you point me to some sample code regarding this?
Thanks,
Wolfgang
More information about the Qt-interest-old
mailing list