Which graphics technology does Qt uses to render its custom UI?
Asked Answered
T

1

6

I inspected the Qt GUI interfaces using window spy tools and I know that it does not use windows common controls or any custom window class to create its UI elements and animation effects. I asked before here about developing a custom GUI framework using GDI/GDI+ but most people responded against these technologies, so the question remains which graphics technology Qt or any other equivalent appropriator system uses to render their UI?

I am aware of DirectX/OpenGL but isn't it overkill for simple requirements? If the answer is going to be one of the above then again I wonder how one could implement robust font rendering and vector graphics solutions with these polygon rendering technology? the full featured text editor is another huge challenge.

Also there already exists solutions based on directx/opengl like MyGUI and CEGUI but I think they look ugly and nowhere near how Qt looks.

Tetchy answered 26/6, 2015 at 8:45 Comment(1)
CEGUI and MyGUI look as ugly as you make them, you are supposed to create your own skin when you use such libraries. That said, CEGUI has multiple skins available out of the box and multiple more available on the forum, etc.Yester
L
9

First things first, Qt-5 introduced a new rendering model, which can (but is not required to) use OpenGL for rendering the UI elements. The upshot of this is, that one can truly mix custom OpenGL rendering with Qt widgets. The downside is, that some kind of OpenGL support is required, which not all systems have.

So Qt also has these two other drawing systems: Native, which will use the hosts systems native graphics primitives (GDI, CoreGraphics, X11/XRender) and raster which does a complete rasterization of a whole window into pixel buffers, where then only those are blitted over to the underlying graphics system. raster is the slowest of the graphics backends, but it gives consistent results for all plattforms and target systems. Hence raster is usually used for programs where consistent appearance is strictly required.

Lapierre answered 26/6, 2015 at 9:7 Comment(2)
How do I use the opengl rendering model?Babbage
This answer is kinda useless without providing more information / resources about this "new backend". Where do we find more about it?Zymometer

© 2022 - 2024 — McMap. All rights reserved.