[Interest] Qt Quick Controls 1 deprecated but no native styles for Qt Quick Controls 2?
giuseppe.dangelo at kdab.com
Fri Dec 7 12:35:44 CET 2018
Not a real answer to the Qt Project's direction (as you're also asking
about that), just a few pointers and remarks here and there.
Il 07/12/18 10:09, Dimitar Dobrev via Interest ha scritto:
> The release notes for Qt 5.12
> <https://wiki.qt.io/New_Features_in_Qt_5.12> worry me quite a little.
> They say that Qt Quick Controls 1 is deprecated. There's a single but
> key reason this is extremely bad news. And this reason is the lack of
> native styles in Qt Quick Controls 2. This alone renders Qt Quick
> Controls 2 useless for building decent desktop applications.
Note that this isn't necessarily true in general, e.g. take a look at
Electron-based desktop applications, which deliberately not follow any
native style. (I'm not saying that this is good or bad; I'm just saying
that those applications exist). QQC2 would be a good match for such
> This in
> turn means our only option remains Qt Widgets - a piece of technology
> which is like a horse carriage. Good for its time but useless in the era
> of automobiles. The very notion of suggesting that for desktop
> development in 2018 we would be deprived of a simple declarative
> language for GUI, a flexible scripting language to match, GPU-based
> optimizations and all other wonderful features Qt Quick has to offer -
> is ridiculous at best.
A few technical notes:
1) You can define QWidget based hiearchies using QML , see for instance
KDAB's Declarative Widgets project:
2) At the very core of native styling in Qt there's QStyle, which uses
CPU-based rendering, relying on pixel perfect output provided by
QPainter. (Take a look into a style class, you'll found thousands of
QPainter draw calls). A native style built for QQC2 will mean one of
* re-using QStyle existing code, which means neglecting your GPU-based
* reimplementing native styles just for QQ2 using GPU-accelerated
primitives, which is super-difficult and surely an investment noone
wants to make (not to mention it would mean two implementations of
native styles, who is going to maintain those?)
* port QStyle itself to some abstraction that allows for GPU-accelerated
rendering (and of course keep CPU-based rendering around, for GPU-less
environments) which again sounds extremely hard, risks regression all
over the place, it's probably a Qt 6-worth break, etc.
> If it's true that Qt Quick Controls 1 is
> deprecated and Qt Quick Controls 2 won't get native styles any time
> soon, this simply means Qt has severely regressed in its offerings to
Why do you say "won't get native styles"? This is kind of a negation of
the future. Was it announced somewhere and I missed that line?
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 4007 bytes
Desc: Firma crittografica S/MIME
More information about the Interest