Answer the question
In order to leave comments, you need to log in
How NOT to inherit styles?
There are groups of differently styled buttons. There are a lot of buttons. Now I apply styles through an explicit listing of QPushButton#name names, but this is difficult to maintain and generally inconvenient.
There is an idea for each type of buttons to inherit a dummy class and set the style for specific classes through promote. In general, this is convenient in terms of programming, but inconvenient for visual editing. The style is displayed in the designer only for the original QPushButton, and styles are not displayed for overridden classes, which is very inconvenient. At the same time, it is impossible to style QPushButton, because its styles are inherited by all child classes, and if this is not necessary, then the styles will have to be redefined for each child class, which makes the styling of the base class meaningless.
Is there any other way to sit on two chairs and not choke on a bone? Conventionally, there are 50 QPushButtons with three different styles, and I don't want to set each of them three times through #name (+ hover + pressed).
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question