I'm trying to make some "complex" button styling with Qt, using QSS, but I'm facing an issue that I can't resolve.
I want to do a gradient rounded border, for example going from blue on the left side to red on the right side:
result wanted
So, here is the stylesheet applied to a QPushButton:
background:
white;
border-radius:
30px;
border-style:
solid;
border-width:
10px;
border-color:
qlineargradient(x1:0, y1:0, x2:1, y2:0, stop: 0 blue, stop: 1 red)
red
qlineargradient(x1:0, y1:0, x2:1, y2:0, stop: 0 blue, stop: 1 red)
blue;
And here is the result.
Pretty ugly, right?