Important: Please read the Qt Code of Conduct -

Difference between QT Quick App, QT Widget App and QT Quick-UI

  • Sorry for asking such a basic question but I'm just getting started with Qt and I have trouble to distinguish them.

    I'm building my own 3D Printer and I want to make it an independant system. So I included a Raspberry Pi which holds all the Modells for the printer and is connected to a Touch Screen Display. Now I want to design a GUI for the touch screen which guides the users through the progress and lets him chose between the various modells.

    I only know widgets from Win Vista where you could put a small clock or a weather forecast on the screen, but there was no interaction with the user. That doesnt seem to be the case in Qt if I understood correctly.

  • Lifetime Qt Champion


    Qt Widget application are using the widgets classes: QWidget, QPushButton, QHBoxLayout etc.
    Qt Quick application are using QML and QtQuick to create the interface. The usual being the GUI with QtQuick and the logic in C++.
    Quick-UI is a pure QML application.

    Depending on what you want, the two first are what you should choose from.

  • Ok what are the differences between widget classes and QML?
    I also read that widgets are more suitable for Desktop Apps and Qt Quick is more suitable for smartphones?

    Does what you said also mean that the Quick-UI doesn't offer any logic just objects?

  • Lifetime Qt Champion

    Widgets come from the desktop world but that doesn't mean you cannot use it for your embedded projects. It really depends on your needs, the design your UI should have and such factors. You should take a look at Qt's extensive documentation about these two modules to see which one would suit your needs best.

    No, it means that all the logic would be in QML but since you are doing a 3D printer, you are likely going to need to talk with your hardware thus needing to access either system devices or custom drivers or a library that implements the communication protocol thus you'll need a C++ backend to connect that with your UI.

  • Moderators

    @MilloMille said in Difference between QT Quick App, QT Widget App and QT Quick-UI:

    I also read that widgets are more suitable for Desktop Apps and Qt Quick is more suitable for smartphones?

    Widgets were invented long ago, before smartphones even existed. This is why widgets were originally designed for desktop apps.

    Nokia invented QML and Qt Quick, as a way to easily create GUIs for their smartphones. This is why Qt Quick was originally designed for smartphones.

    However, work is being done to unify the two worlds. For example, the Qt Quick Controls contain many components designed for desktop apps.

    what are the differences between widget classes and QML?

    Here's a few...

    Differences in language:

    • Widget classes are C++ classes; you can code them completely in C++.
    • QML is a language with declarative components. It is similar to CSS, JSON, and JavaScript.

    Differences in technology:

    • Qt Widgets use CPU (software) rendering only
    • Qt Quick can use GPU (hardware) rendering
    • Because Qt Widgets is older, it has been developed longer so it is more more mature and stable.
    • Because Qt Quick is newer, it has modern features not found in widgets, such as fluid animations and Particles

  • You should be able to develop the hardware-specific code for your 3D printer C++ and still create your GUI from QML.

    Just have a look at the Qt Documentation on interaction between C++ and QML.

    For developing the Touch UI, you could also have a look at V-Play Engine, which also supports Raspberry Pi.

  • "Widget" traditionally means a UI component for programmers. In Windows the term is used for certain small end user applications, so the two meanings have almost nothing to do with each other.

    Unfortunately the situation is not so simple that you must choose only between C++ widgets and QML. If you choose QML you have to choose between older Controls and newer Controls 2 if you use Qt 5.7 or newer. You use Raspberry Pi where the older QML Quick Controls look like desktop widgets by default (at least if you have some normal Pi Linux distro installed) and the newer Quick Controls 2 look like mobile phone widgets.

    If you have Qt Creator installed, check the demos. "Qt Quick Controls 2 - Gallery" and "Qt Quick Controls - Gallery" give you a good picture of what you can expect. See also "Quick Controls - Touch Gallery" to see how the older controls can look like mobile phone controls. I don't know if the C++ widgets can look like that easily.

    If you use the default Qt offered by a Raspberry distro it may have older than 5.6 Qt installed and you don't have to choose between Controls and Controls 2 (the latter is in "labs" in Qt 5.6), just use Controls.

    Anyways, in my opinion for touch display a mobile phone -like interface would be better than a traditional desktop interface. Take that into account.

Log in to reply