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. Can find TreeView module in QML
Forum Updated to NodeBB v4.3 + New Features

Can find TreeView module in QML

Scheduled Pinned Locked Moved Solved QML and Qt Quick
5 Posts 3 Posters 674 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.
  • ocgltdO Offline
    ocgltdO Offline
    ocgltd
    wrote on last edited by ocgltd
    #1

    I'm trying to build a simple QML app which uses a TreeView, using QT Creator with QT 5.15.2. I discovered that TreeView is not included with QtQuick Controls 2.x so the compilation fails.

    Instead it seems (if I understand the documentation correctly) that I must import QtQuick.Controls 1.4 But Qt Creator complains that it's not installed. And the Qt Maintenance tools doesn't offer a way to install this.

    Help! What am I doing wrong?

    J.HilkJ 1 Reply Last reply
    0
    • ocgltdO Offline
      ocgltdO Offline
      ocgltd
      wrote on last edited by
      #5

      I installed 5.x kit, so Qt Controls 1.x SHOULD be installed. I closed Qt Creator and reopened and now warning is gone. Strange...

      But I am still unclear on something. is TreeView included with QtQuick Controls 2.x ? If not, does that mean TreeView is deprecated and will be dropped in Qt 6? (Should I avoid using TreeView ?)

      1 Reply Last reply
      0
      • ocgltdO ocgltd

        I'm trying to build a simple QML app which uses a TreeView, using QT Creator with QT 5.15.2. I discovered that TreeView is not included with QtQuick Controls 2.x so the compilation fails.

        Instead it seems (if I understand the documentation correctly) that I must import QtQuick.Controls 1.4 But Qt Creator complains that it's not installed. And the Qt Maintenance tools doesn't offer a way to install this.

        Help! What am I doing wrong?

        J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #2

        @ocgltd if you're running open source, you can get it "for free" from the market place

        https://marketplace.qt.io/products/treeview?_pos=1&_sid=1fe207197&_ss=r


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        0
        • fcarneyF Offline
          fcarneyF Offline
          fcarney
          wrote on last edited by
          #3

          QtQuick.Controls 1.x is always installed. Did you try using it with QtQuick.Controls 2.x?
          Is that case:

          import QtQuick.Controls 1.4 as QC1
          
          ...
          
          QC1.TreeView {
          }
          

          C++ is a perfectly valid school of magic.

          J.HilkJ 1 Reply Last reply
          0
          • fcarneyF fcarney

            QtQuick.Controls 1.x is always installed. Did you try using it with QtQuick.Controls 2.x?
            Is that case:

            import QtQuick.Controls 1.4 as QC1
            
            ...
            
            QC1.TreeView {
            }
            
            J.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on last edited by
            #4

            @fcarney if the op uses Qt6, than Control 1 is not automatically installed :(

            I know @ocgltd said using QT Creator with QT 5.15.2 but that may be from the about QtCreator page and not from the kit he uses


            Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


            Q: What's that?
            A: It's blue light.
            Q: What does it do?
            A: It turns blue.

            1 Reply Last reply
            1
            • ocgltdO Offline
              ocgltdO Offline
              ocgltd
              wrote on last edited by
              #5

              I installed 5.x kit, so Qt Controls 1.x SHOULD be installed. I closed Qt Creator and reopened and now warning is gone. Strange...

              But I am still unclear on something. is TreeView included with QtQuick Controls 2.x ? If not, does that mean TreeView is deprecated and will be dropped in Qt 6? (Should I avoid using TreeView ?)

              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