I am creating an Error Message Box for my Screen. I am using QDialogButtonBox for buttons.
Now i want to fill Buttons with different colors.
For example:
“OK” –> Green
“Cancel” –> Red etc.
I am able to change the background for all buttons , but not individually.
Is there any way to do this ??
Thanks in advance !!!!
Try this(using QDialogButtonBox::button() and QPushButton::setStyleSheet()).
EDITED: typo fixed in code around building style sheet string.