[Interest] QAbstractItemDelegate like interface for QHeaderView.
André Somers
andre at familiesomers.nl
Tue Apr 22 10:19:37 CEST 2014
D. Brentjes schreef op 20-4-2014 09:40:
> Hello everybody,
>
> I'm using the ItemDelegate system to last minute convert all my custom
> object to a QString representative of the content. This works great, but
> yesterday I discovered that QHeaderView actually does not use the
> ItemDelegate facility.
True. It has also been documented that way, even though the API suggests
otherwise.
> Has this been done deliberately,
That seems likely, yes.
> and would it still be possible to
> convert the data in a similar way for the QHeaderView.
Sure. Just subclass QHeaderView and do your work there, or adapt your
model (or use a proxy model) to provide the conversion instead of
relying on the view to do the work.
André
More information about the Interest
mailing list