[Development] Deprecation of Qt Quick Controls 1

Olivier Goffart olivier at woboq.com
Wed Feb 7 16:48:19 CET 2018

Am Mittwoch, 7. Februar 2018, 15:35:34 CET schrieb NIkolai Marchenko:
> even stuff like that?
> https://imgur.com/a/tTFeO
> I doubt it. I really don't want to delve into manual painter usage and
> styleoptions when I can just quickly make such stuff with qml listview.
> And basically the only thing that really hurts me with controls 2 is that
> combobox becomes quite horrible

That can be done without too much difficulty.  For reference, i have been
doing the ui for the ownCloud client with a QTreeView: 

"All you have to do," is create a QAbstractItemDelegate, then you can paint
anything with QPainter. It is just a bunch of drawRectangle and drawText, 
and for the style element, you can use style()->drawComplexControl
You have to layout everything by manually computing the position of items.
The logic of the embedded combobox might be a bit tricky but perhaps a spinbox 
would be much easier to draw.

Clearly this is not the prettiest code ever

So while it is possible to do this, this is indeed much harder and less 
maintainable than with QML.

Unfortunately, it seems that the story for QML on desktop is less than ideal.
There is still much polishing to do to get there. And the fact that Qt Quick 
Controls 2 does not seem to have the desktop as a first place citizen is worrying. 

The Qt Company does not seem to be interested in the desktop. The fact that
QtCreator went back from using some of QML for example just shows that the
situation is regressing rather than improving.


Woboq - Qt services and support - https://woboq.com - https://code.woboq.org

More information about the Development mailing list