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. QHeaderView stylesheet
Forum Updated to NodeBB v4.3 + New Features

QHeaderView stylesheet

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 1.7k Views
  • 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.
  • ivanicyI Offline
    ivanicyI Offline
    ivanicy
    wrote on last edited by
    #1

    Hello!

    I am styling a QTableWidget's QHeaderView. I want to give it a border-radius in all the QHeaderView but the subcontrol QHeaderView::section gives the properties to all columns.

    I have that:

    68c34d0a-6785-407b-bb77-22c1398f2e2b-image.png

    but I need that:

    8beb8852-3cdf-4c82-b891-6b3b8a293da7-image.png

    How can I do it?

    Thank you very much!

    1 Reply Last reply
    0
    • BondrusiekB Offline
      BondrusiekB Offline
      Bondrusiek
      wrote on last edited by
      #2

      ![Maybe you should divide image to 3 sections. For edges us 0 and 2 propertly. For internal header use second image.headers.png

      ivanicyI 1 Reply Last reply
      0
      • BondrusiekB Bondrusiek

        ![Maybe you should divide image to 3 sections. For edges us 0 and 2 propertly. For internal header use second image.headers.png

        ivanicyI Offline
        ivanicyI Offline
        ivanicy
        wrote on last edited by
        #3

        @Bondrusiek said in QHeaderView stylesheet:

        Maybe you should divide image to 3 sections. For edges us 0 and 2 propertly. For internal header use second image.

        And which is the code for doing that?

        1 Reply Last reply
        0
        • ivanicyI Offline
          ivanicyI Offline
          ivanicy
          wrote on last edited by
          #4

          I fix it doing this:

          QTableWidget > QHeaderView::section:first {
          	border-top-left-radius: 5px;
          }
          
          QTableWidget > QHeaderView::section:last {
          	border-top-right-radius: 5px;
          }
          
          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