[Interest] QWidget style change and reverting it back
Prav
pr12og2 at programist.ru
Wed Feb 10 09:24:19 CET 2016
>> > The QStyleSheetStyle class is supposed to mimic the
>> > platform's style, but it exists in the first place in order to do things
>> > that are not possible with the platform's style.
>>
>> OK ... how one can understand which properties of style-sheet language are
>> "possible with the platform's style" (to be able to avoid this bad-mimic
>> behaviour of QStyleSheetStyle class as much as possible)?
> Assume that whenever you use stylesheets, your widgets may look completely
> different from what it would otherwise look.
> As I said, you're using style sheets BECAUSE you want to have an alien (non-
> native) look and feel. So accept they will look different.
I think here is the main difference in your thinking about usefulness of style sheets:
One may want to use style sheets not because
"you're using style sheets BECAUSE you want to have an alien"
BUT because "it is easy to understand and change".
And both ways can be possible IF QStyleSheetStyle would not look like
an alien. Who wanted to get all things as needed would specify all
properties like needed and those who want to change only couple of
properties would do only this.
Even in docs (http://doc.qt.io/qt-5/stylesheet.html) this
idea of QStyleSheetStyle to be like platform-specific style is
specified.
"The wrapper style [here meant what is returned by QWidget::style()
after applying setStyleSheet() to widget]
ensures that any active style sheet is respected and otherwise
forwards the drawing operations to the underlying, platform-specific style"
So I would say that to be an "alien" is not the value for thous who want
to use setSetyleSheets().
More information about the Interest
mailing list