What even are Breeze, QtQuick, QtWidget, Union..?

Thank you Noah for taking your time to share your in-depth knowledge. I think I am clearer as to the situation now.

If we have to, we can just add support for more settings in the themes. If you have a great behavior tweak for scrollbars, we can have a way to support it. Doesn’t necessarily mean it will happen, but it could.

OK, thank you. I will probably submit the scrollbar design upstream when I get time. I will have to take time to review the Union source-code to decide what is possible and where to submit it, and before commenting further.

It is a completely rewritten scrollbar design to one I submitted to Breeze a few years ago (available in Klassy). Auto-hiding arrows with no gaps at the scrolling extremities, now draggable from the extremities. One of the fixes I added was one suggestion you had made at the time (to also replace the arrows when at an extremity when mouse also over, though you probably don’t remember):
scrollbar_mouseover

On qqc2-desktop-style, I guess the main point I was trying to make was not to completely abandon this approach and to hopefully keep working on ways to make it as fully automatic as possible (hopefully with support from the Qt people to make necessary Qt changes). It is a lot of effort to have to rewrite existing themes.

Thanks for mentioning StyleKit - sounds interesting - I need to look into it when I get time. I assume StyleKit themes would still work on Plasma? (you just aren’t going to make them downloadable?)

Unfortunately, Qt people explained that this cannot be used to render Qt Widgets at Akademy 2026. Basically, QPainter is too ingrained in Qt Widgets to replace it with QCanvasPainter and QCanvasPainter is not a drop-in replacement for QPainter.

My understanding from reading Qt’s press release on QCanvasPainter is that it isn’t going to automatically add GPU-rendering to something written in QPainter, but would work if you rewrote the QPainter code. Is this wrong? Is that Akademy presentation online? (sounds interesting)

On GPU rendering, I’m not sure that it is advantageous to even have it at all for all the small and simple 2D graphics that are used in desktop themes. Seeing detailed profiling/performance benchmarking data would be needed for me to comment further. I read people complaining about the overhead GPU adds to QCC apps. Vlad was also saying a few months ago that software rendering for the window decorations seemed fine.

I’m not 100% sure about the details of stylekit here. I think that if an app dev ships an app that is using their own stylekit theme, the app will be shipped with that stylekit theme and you probably won’t be able to use the system theme or another stylekit theme unless you patch the app. I don’t think you can simply download a stylekit theme and use it with just any app right now. If we wanted to support stylekit themes on the system level, we might be able to find a way to make it work as long as apps don’t force a particular style or make rigid assumptions about how Qt’s UI elements should work, but it’s probably not that straight forward. Like I said before, Qt’s solutions are mainly aimed at app devs and cross platform development. In that context, an app dev might develop a stylekit theme for a series of apps and ship them all with that theme.

You’re basically right, but then how do you actually rewrite a QWidget subclass to avoid using QPainter when it is built to use QPainter? The QWidget itself is a QPaintDevice subclass and all paintEvent overrides paint on the widget. When the QWidget calls the QStyle to paint onto itself, how can you even begin to use QCanvasPainter instead in the QStyle? You could switch to QCanvasPainter if you were just drawing an image and the image didn’t need to be a QPaintDevice subclass, but that’s not the case for Qt Widgets.

It really depends on what you’re doing. For a lot of apps, QPainter really is just fine, especially when you don’t need to deal with high resolution screens or lots of images and you don’t use too many fancy graphical effects. The need for GPU acceleration mainly comes in when you start needing to do lots of things with blur, animations, images, very large item views, large images, basically anything where the answer to “do we update a lot of pixels” is yes. This also explains why the window decorations were fine. Window decorations typically aren’t that complicated. Qt Widgets and QPainter work fine a lot of the time, but they put a ceiling on what you can do.

1 Like