Planned maintenance has been done but it did not solve the problem. So work will continue on this and a new time for trying updates will be announced asap.

I'm sticking with Widgets



  • The QML designer is buggy, and QML itself is another layer of abstraction. The Widget designer, however is much more stable and produces code which ends up being part of the compilation process.


  • Moderators

    That's fine. Both QML and Widgets are and will continue to be fully supported.

    In Qt 6 large parts of QML will be compiled into C++, too.



  • Not that I have used QML, but I don't really understand what it is for?! If you have a large program with loads & loads of windows/dialogs and it has to do a fair amount of stuff, all I see is questions about how to accomplish from QML for which the solution is to write C++ code which accesses the underlying widget methods. So what's the point, other than for small UIs?


  • Moderators

    @JonB I can tell you the reasons, why I went into QML.

    Performance.

    The native GPU rendering makes it the solution for mobile devices. Especially as it is that much faster and easier to create and populate a scene than using QOpenGLWidget or something similar.

    Animation.
    It is so, SOOOOO easy to do any kind of animation in QML where as with QWidget you'll have to sacrifice your first born and most of the time it's not enough.


  • Moderators

    @JonB said in I'm sticking with Widgets:

    Not that I have used QML, but I don't really understand what it is for?! If you have a large program with loads & loads of windows/dialogs and it has to do a fair amount of stuff, all I see is questions about how to accomplish from QML for which the solution is to write C++ code which accesses the underlying widget methods. So what's the point, other than for small UIs?

    What's the point of QML? Oh there are many. It works great also for big UIs, don't worry.

    The biggest advantage is just how easy it is to create beautiful, animated, touch-oriented UIs. Then there is also stronger separation of logic and UI code (in widgets it's much easier to mix these two). Also, with QML, designers can create the UI while programmers focus on logic (I have not tried that approach, though). It's easier to create custom components that with widgets. In some cases it's easier to get good performance, too (since part of the drawing work is done by GPU). And of course, it is much easier to get a solution that works great on desktops and mobile phones with the same code. Widgets on mobiles - while they work - are not a pleasant experience.



  • Thank you. You both mention mobiles, which is interesting. I could care less about mobiles, they are from the devil anyway :) I take the point about animation. I am no-animation, desktop-only, so that may explain.

    Nonetheless, I do see from questions here that often a behaviour wanted from QML requires dropping into C++ Qt code to achieve the desired. That's fine, it just means that in that case doing it all from QML does not prevent you having to learn about the Qt C++ side of things as well as QML.


Log in to reply