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. QTableWidget Stylesheet Border Radius Issue
Qt 6.11 is out! See what's new in the release blog

QTableWidget Stylesheet Border Radius Issue

Scheduled Pinned Locked Moved Unsolved General and Desktop
1 Posts 1 Posters 544 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.
  • S Offline
    S Offline
    shreya_agrawal
    wrote on last edited by
    #1

    I have a QTableWidget. I use the following code to give it border-radius:

    QTableWidget#table {
       background-color: #EEEEEE;
       border-radius: 20px;
       margin: 10px;
       border: 1px solid black;
    }
    
    QHeaderView::section {
        background-color: #CCCCCC;
        border-radius: 20px;
        height: 50px;
    }
    

    I am getting the following output:

    Screenshot from 2024-07-01 16-26-54.png

    If I don't give border radius to header, I get the following output:

    Screenshot from 2024-07-01 16-29-30.png

    I just want the top corners of the table to be rounded properly, without affecting the border radius of the header. Any suggestions?

    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