PDA

View Full Version : Color od pushbutton can not be changed



Pereubu2018
6th July 2018, 10:17
I have to put pushbutton and the rest to different colors. I cannot do that. I have picked from component properties
Style Sheet, and click on … . I got pop-up windows with "Edit Style Sheet - Qt Designer", with 4 options: Add Resources, Add Gradient, Add Color and Add Font. I selected "Add Color", from there I have selected desired Color. Pressed Ok, and got message "invalid style sheet". The same happened for any color…

I am working on MSVC VC++ with qt as add on. What I am doing wrong?
here is screenshot:

12893

d_stranz
6th July 2018, 23:30
Simply adding the color does not create a valid style sheet. You need actual CSS / QSS:



QPushButton:pressed { \
background-color: rgb(224, 0, 0); \
border-style: inset; \
}

Pereubu2018
9th July 2018, 10:08
That was it. I have direction where to go.