Important: Please read the Qt Code of Conduct -

How to Render displayed horizontal and vertical header of QTableView

  • Hi, i use a QTableView to display a data models. I set the vertical and the horizontal header text but this are displayed with a rectangle like in the picture:Screenshot from 2019-11-05 15-12-23.png My question is how can i remove these rectangle from the view?
    One issue that i try is to reimplement the painSection function in the model at first and in the delegate finally but this does not work.
    Thank in advance.

  • @vladzouth
    Have you tried/it might be easiest playing with stylesheet for this, like QHeaderView::section { ... } perhaps border-... attributes, or whole QTableView?

  • you are right @JonB . It works using stylesheet. Thank you

Log in to reply