How change backcolor of pushbutton with text?
This sample works:
PUSH_NewAlarms.borderStyle=BS_NONE;
PUSH_NewAlarms.backCol="red";
It is required that the button border is not lost.
How change backcolor of pushbutton with text
- Victor.Ermakov
- Posts:25
- Joined: Fri Oct 20, 2017 8:50 am
How change backcolor of pushbutton with text
- adaneau
- Posts:310
- Joined: Tue Feb 21, 2012 9:49 am
Re: How change backcolor of pushbutton with text
Hi,
You can use stylesheet for this (see Style Sheets, basics in help).
Example:
BR
Alexandre Daneau
You can use stylesheet for this (see Style Sheets, basics in help).
Example:
Code: Select all
QPushButton[type = "myButtonTypeName"]
{
border-radius: 5px;
background-color: red;
border-style: solid;
border-width: 2px;
border-color: black;
}
Alexandre Daneau