Is it possible to make the headrlabels in QTableView editable



  • is it possible to make the headrlabels in QTableView editable during run time "both horizontal and vertical"
    and if yes how


  • Lifetime Qt Champion

    Hi,

    I think you have to subclass QHeaderView and implement that feature. Then you can set your custom header view on your QTableView

    EDIT: Jeroentje@home's idea is better



  • Hi,
    Since the QAbstractItemModel (connected to view?) is able to be called with setHeaderData() function it is possible to alter the header data. IYAM you will have to set the flags in the model for the header to 'editable' and the view will do so. If you want nice qlable pup-ups you could also add delegates to do so.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.