Search code examples
qtquick2qtquickcontrols

Qt Quick 2.2 Application: Choosing component set step


I am creating a new Qt Quick application in Qt 5.3 for the first time. I would like to have the latest controls available.

When prompted to select a "Component Set" my dropdown options are : Qt Quick 2.0/2.1/2.2, and Qt Quick Controls 1.0/1.1.

What is the difference between the "Qt Quick" and "Qt Quick Controls" options? Which is the "latest and greatest?"

Thanks in advance.


Solution

  • If you'd like to have the latest controls available, you should pick the Qt Quick Controls 1.1 option. This will set up an ApplicationWindow-based application for you.

    The difference between the two:

    • Qt Quick is the basic-yet-powerful set of building blocks that allows you to create applications where a notion of a native look and feel is not important.
    • Qt Quick Controls provide the Qt Quick equivalent of widgets, but with a styling API that is much more user-friendly.

    Creating Qt Quick UI Projects says:

    The Qt Quick imports enable you to create cross-platform applications with a custom look and feel, whereas the Qt Quick Controls provide the look and feel for a particular platform

    It is worth mentioning that the styling API also allows you to intentionally create controls that don't look native. For that reason, I'd always recommend picking the Qt Quick Controls component set, as you get a lot of stuff (including Layouts) that is really useful.