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. Why are there two Qt Quick Controls namespaces (1.4 and 2.3) and is it okay to use both?
Forum Updated to NodeBB v4.3 + New Features

Why are there two Qt Quick Controls namespaces (1.4 and 2.3) and is it okay to use both?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
controls 1.4controls 2
3 Posts 2 Posters 642 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.
  • A Offline
    A Offline
    aybe
    wrote on 13 May 2019, 17:49 last edited by
    #1

    I'm currently learning Qt, (coming from C# and WPF worlds)

    I was looking for a TreeView and I couldn't find it in the Design tab, then by looking at its documentation it appears that instead import QtQuick.Controls 1.4 is necessary instead of the import QtQuick.Controls 2.3 found when you create a new Qt Quick Application - Empty project.

    I then realized that in fact you can import both namespaces and indeed you have best of both worlds.

    My (folded) question is the following:

    Is this something okay to do and are there any caveats in doing so?

    Additionally, are the controls in 1.4 in the long term going to end up in 2.3?
    i.e. why are there two namespaces with different versions and controls?

    (a link to relevant documentation would be appreciated)

    Thank you.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 13 May 2019, 18:17 last edited by
      #2

      Hi and welcome to devnet,

      The modules have two different versions because they are built on top of two different technologies. You can mix them but usually use the V2 version.

      AFAIK, the long term plan is to obsolete V1 and completely replace it with V2.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • A Offline
        A Offline
        aybe
        wrote on 13 May 2019, 20:53 last edited by aybe
        #3

        Thank you, alright!

        1 Reply Last reply
        0

        3/3

        13 May 2019, 20:53

        • Login

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