https://doc.qt.io/qt-5/stylesheet-reference.html#:~:text=widget%2Danimation%2Dduration*

Wouldn't this allow animated fades?

On Mon, May 30, 2022 at 4:32 PM Sven Brauch <m...@svenbrauch.de> wrote:

> Hi,
>
> On 5/30/22 20:37, samuel ammonius wrote:
> > I've worked with regular CSS and I'm sure that stylesheets offer just as
> > many customization options as things like QtCurve or QStylePlugins. The
> > reason that it may not seem this way is because Qt didn't document
> > regular CSS syntax in the documentation for stylesheets.
>
> No, the reason is that Qt's CSS has absolutely nothing to do with the
> regular CSS known from browsers. It's a proxy style which tweaks how a
> base style (e.g. Fusion or Breeze) draws elements on the screen, by e.g.
> modifying the palette and then forwarding the draw call to the base
> style. It implements maybe 1% of the CSS stuff a modern browser can do,
> and that's a favourable estimate. And not even all of that will work as
> expected in all cases. For details, see [1].
>
> That this proxy style's behaviour can be configured using a CSS-like
> syntax is coincidental, or, well, intentionally made that way for ease
> of use. But: this is not the CSS you know or expect.
>
> > I can't verify that stylesheets can do everything that a style plugin
> > can do
>
> They can't. Regular CSS 3 in Firefox is probably pretty close,
> practically speaking, but Qt's CSS, not so much.
>
> > but I know for sure that Breeze can be made using a qstylesheet
>
> Where did you get this information? This is certainly not the case. Just
> try to make e.g. the animated fades in Breeze using Qt's CSS and Fusion
> as the base style and you will immediately discover that it's not possible.
>
> Greetings,
> Sven
>
> _____________
> [1]
>
> https://code.woboq.org/qt5/qtbase/src/widgets/styles/qstylesheetstyle.cpp.html
>

Reply via email to