Answer the question
In order to leave comments, you need to log in
QML vs Qt Widgets - which is better for interface implementation?
Going to develop a new application (in C ++ and Qt), I was faced with a choice: how to implement the interface - in QML or make widgets the old fashioned way (there will be a widget inherited from QPainter on which objects will be drawn and scrolled, and a few more widgets with various text fields and buttons). With QML, I have no experience, so on widgets I will make the interface much faster. However, maybe QML has some advantages over traditional widgets? So what? Which one is more productive?
Answer the question
In order to leave comments, you need to log in
As for performance, the difference is only at the start, when QML is loaded and parsed. Further, on its basis, ordinary “plus” objects are created in memory, so there will be no difference during execution. And if your QML is not super-duper heaped up, then you won’t feel the difference during loading either.
The advantages of QML are a more compact, more readable description of the interface, as well as the fact that the Qt development trend is clearly moving towards QML. In Qt5, it seems that native widgets are gradually moving away (I won’t lie here, maybe I’m wrong).
On QML, complex interfaces with animation and other things are much faster to write than on widgets. Plus various goodies such as effects.
And the widget inherit from QPainter - you wrote something very strange.
Wrote the interface on Qt, in recent days just touched QML.
The sharpness of QML for mobile platforms is clearly visible - when drawing the interface, you somehow begin to think in this direction yourself.
QML is worth choosing if you want to provide the same / similar interface for mobile and desktop versions of the application. Or you want to make the interface very different from ordinary programs. For example, it is good for toys.
I would not make complex interfaces on QML - there is a lot of fuss, but there is little output.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question