1 Attachment(s)
Problem with border radius on my QHeaderView
Attachment 9164
I'm having a problem with my header on a QTreeWidget. I've been trying to use a border radius on both the tree and the header, but around the header I get this white space where the corners would be if they were not rounded. See image. What I want it to do is show the background image instead of the white space. This works on the bottom of the QTreeWidget, so I'm fairly certain the problem is with the QHeaderView. I've tried various methods to fix this but have been unable to so far. Any help would be appreciated.
Here are the stylesheets ive used for these widgets:
Code:
background-color: rgb(40, 41, 46);
color: rgb(203,204,207);
padding: 0px 0px 0px 0px;
outline: none;
border: 0px;
margin: 0px;
border-radius: 7px;
}
background-color: #202020;
color: #7ea229;
}
{
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #88af2c, stop: 1 #718b31);
}
{
background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #88af2c, stop: 1 #718b31);
}
QTreeWidget::branch:selected
:closed
:has
-children
:has
-siblings
{ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #88af2c, stop: 1 #718b31);
}
QTreeWidget::branch:selected
:open
:has
-children
:has
-siblings
{ background-color: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #88af2c, stop: 1 #718b31);
}
padding: 4px;
font: bold 11pt;
color: rgb(203, 204, 207);
background-color: rgb(26,27,31);
border-top-left-radius: 7px;
border-top-right-radius: 7px;
}
#catalogueItemHierarchyTree
{
border: 0px;
background-image: url(:/please-wait-bg200.png);
background-repeat: none;
background-position: center;
}
Re: Problem with border radius on my QHeaderView
Figured it out. This was the solution:
QTreeWidget > QFrame{ background-image: url(:/icons/Ribbon/ribbonbg.png);}
Didn't realize you could do the QTreeWidget > QFrame thing.
Re: Problem with border radius on my QHeaderView
Hey I have the same issues but I don't understand this solution. Why is he setting an image? And what means QTreeWidget > QFrame
Re: Problem with border radius on my QHeaderView
Mhm can nobody help me? :(