1

Topic: Dynamic change of style

Whether change of style of a control item by means QSS, depending on value of properties of child controls is possible? In particular, I want to change style of boundary QScrollArea, whether depending on that there are skrol-bars, and whether there are they in limiting lower (upper) value. Now I entered pair of additional properties which I update on the side With ++ the code that is very ugly. Besides, it is necessary manually e setStyleSheet after each update of properties.

2

Re: Dynamic change of style

Hello, Chorkov, you wrote: a C> Now I entered pair of additional properties which I update on the side With ++ the code that is very ugly. Yes, through properties also it is necessary. The C> Besides, is necessary manually e setStyleSheet after each update of properties. It is possible to make signals/SLOTS once. A recall setStyleSheet - it is expensive. It is necessary at  to pull w-> polish (); w-> unpolish (); (when comes property changed).

3

Re: Dynamic change of style

Hello, Chorkov, you wrote: whether a C> change of style of a control item by means QSS, depending on value of properties of child controls is possible? A C> In particular, I want to change style of boundary QScrollArea, whether depending on that there are skrol-bars, and whether there are they in limiting lower (upper) value. A C> Now I entered pair of additional properties which I update on the side With ++ the code that is very ugly. The C> Besides, is necessary manually e setStyleSheet after each update of properties. Something similar to it: https://stackoverflow.com/questions/247 … appear-but

4

Re: Dynamic change of style

Hello, AlexGin, you wrote: AG> Something similar to it: AG> https://stackoverflow.com/questions/247 … appear-but And here generally it? At the dude on SO simply curve styles. The HARDWARE asks how to control styles from the code.

5

Re: Dynamic change of style

I will simply advise to you and you already as want. If at you desktop application, stop to try to use QSS and do own style having inherited from QCommonStyle. In the first all is much easier, and in debugging too. In the second at such approach type UI only is restricted by your imagination and still some possibilities of library Qt (though at desire it is possible and Qt  that I and did).