1 Attachment(s)
Re: Editable table header
Quote:
Originally Posted by
bbarran
I'm using a subclass of QAbstractTableModel to help edit some table information. Editing the contents of the table by overriding flags() seems fine but I can't edit the horizontal table header (ie rename the columns). What's the trick for doing this?
Unfortunately there is no straightforward trick to do this. One needs both custom header view and item delegate to achieve editable headers. I have attached an example how I did it. Comments are more than welcome. ;)
Re: Editable table header
Thanks for the example jpn. I've worked around it already and now have experience implementing custom delegates so I'll think I'll go back and do something similar to you.
Re: Editable table header
Any chance of posting the archive back or copy-pasting the code?
The archive seems corrupt...
Regards,
Davor
Re: Editable table header
I will be very thankful if somebody provide an example with editable table header.
Thanks