I'm trying to apply a custom color to several parts of a Qt GUI, using Qt designer and the main stylesheet.
One solution would be using this:
#MainWindow{ background-color: #334422; }
#first_label{ background-color: #334422; }
#second_label{ background-color: #334422; }
But it is not scalable, what if I want to change that color again? So I tried to use this, that I think it'd work with web .css files:
.bg_color{ background-color: #334422; }
#MainWindow{ .bg_color }
#first_label{ .bg_color }
#second_label{ .bg_color }
But I get an Invalid stylesheet
message.
Any ideas?