[Interest] Qt Quick Controls 1 deprecated but no native styles for Qt Quick Controls 2?
Giuseppe D'Angelo
giuseppe.dangelo at kdab.com
Fri Dec 7 13:11:22 CET 2018
Hi,
Not a real answer to the Qt Project's direction, just a few pointers.
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
usecases.
> 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
> https://github.com/KDAB/DeclarativeWidgets
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
these options:
* re-using QStyle existing code, which means neglecting your GPU-based
optimizations
* 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
> developers.
Why do you say "won't get native styles"? (What I mean is, where does
this certainty for the future come from?)
--
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...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4007 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20181207/6b7dfd7f/attachment.bin>
More information about the Interest
mailing list