
Originally Posted by
tommy
I don't really want gradient, I need left side of the button to be one color and right side a different color with a sharp border. How would you do that? Are there any examples out there with the syntax?
A linear gradient is still fine. Remember, you can define a color at any stop. Try something like:
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
stop:0.5 red, stop:0.5 blue);
border: ...
}
QPushButton {
background: qlineargradient(x1:0, y1:0, x2:1, y2:0,
stop:0.5 red, stop:0.5 blue);
border: ...
}
To copy to clipboard, switch view to plain text mode
Bookmarks