Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. QtQuick vs QtQml (Qt 6.2)
Forum Updated to NodeBB v4.3 + New Features

QtQuick vs QtQml (Qt 6.2)

Scheduled Pinned Locked Moved Solved QML and Qt Quick
6 Posts 4 Posters 622 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    paulmasri
    wrote on last edited by
    #1

    I'm used to starting QML files with import QtQuick but some documentation pages have import QtQml instead. e.g. https://doc.qt.io/qt-6/qtqml-index.html

    Likewise, looking at examples of CMake, sometimes I see

    find_package(Qt6 6.2 COMPONENTS Quick REQUIRED)
    ...
    target_link_libraries(... PRIVATE Qt6::Quick)
    

    and other times I see

    find_package(Qt6 6.2 COMPONENTS Qml REQUIRED)
    ...
    target_link_libraries(... PRIVATE Qt6::Qml)
    

    What's the difference? And which should we be using for Qt 6.2+?

    1 Reply Last reply
    0
    • V VietNguen

      This post is deleted!

      GrecKoG Offline
      GrecKoG Offline
      GrecKo
      Qt Champions 2018
      wrote on last edited by
      #5

      @VietNguen said in QtQuick vs QtQml (Qt 6.2):

      In short QML to handle the interface part
      QT handles the backend.

      That's not helping and pretty vague.

      Qt is the framework. QML is a language part of the Qt framework. There is a QtQml QML module providing non-visual types. There is a QtQuick QML module providing visual types.

      P 1 Reply Last reply
      1
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #2

        QML is the language (so when you import it, you get basic non-visual types), QtQuick is the collection of components.

        And which should we be using for Qt 6.2+?

        Best use both.

        (Z(:^

        1 Reply Last reply
        0
        • GrecKoG Offline
          GrecKoG Offline
          GrecKo
          Qt Champions 2018
          wrote on last edited by
          #3

          The QtQuick documentation says:

          The Qt Quick module is the standard library for writing QML applications. While the Qt QML module provides the QML engine and language infrastructure, the Qt Quick module provides all the basic types necessary for creating user interfaces with QML. It provides a visual canvas and includes types for creating and animating visual components, receiving user input, creating data models and views and delayed object instantiation.

          Use both.

          1 Reply Last reply
          0
          • V Offline
            V Offline
            VietNguen
            wrote on last edited by
            #4
            This post is deleted!
            GrecKoG 1 Reply Last reply
            0
            • V VietNguen

              This post is deleted!

              GrecKoG Offline
              GrecKoG Offline
              GrecKo
              Qt Champions 2018
              wrote on last edited by
              #5

              @VietNguen said in QtQuick vs QtQml (Qt 6.2):

              In short QML to handle the interface part
              QT handles the backend.

              That's not helping and pretty vague.

              Qt is the framework. QML is a language part of the Qt framework. There is a QtQml QML module providing non-visual types. There is a QtQuick QML module providing visual types.

              P 1 Reply Last reply
              1
              • GrecKoG GrecKo

                @VietNguen said in QtQuick vs QtQml (Qt 6.2):

                In short QML to handle the interface part
                QT handles the backend.

                That's not helping and pretty vague.

                Qt is the framework. QML is a language part of the Qt framework. There is a QtQml QML module providing non-visual types. There is a QtQuick QML module providing visual types.

                P Offline
                P Offline
                paulmasri
                wrote on last edited by
                #6

                @GrecKo said in QtQuick vs QtQml (Qt 6.2):

                There is a QtQml QML module providing non-visual types. There is a QtQuick QML module providing visual types.

                Thanks, that's a great, succinct explanation!

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved