Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to Render displayed horizontal and vertical header of QTableView
Forum Updated to NodeBB v4.3 + New Features

How to Render displayed horizontal and vertical header of QTableView

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 390 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    vladzouth
    wrote on last edited by
    #1

    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.

    JonBJ 1 Reply Last reply
    0
    • V vladzouth

      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.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

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

      1 Reply Last reply
      4
      • V Offline
        V Offline
        vladzouth
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved