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. selectionMode property not available in TreeView 2
Forum Updated to NodeBB v4.3 + New Features

selectionMode property not available in TreeView 2

Scheduled Pinned Locked Moved Solved QML and Qt Quick
7 Posts 2 Posters 610 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
    #1

    I am using the TreeView (v2) from the marketplace. I wish to set the 'selectionMode' property in the treeview but this property is not recognized.

    According to docs the TreeView inherits from BasicTableView, which contains a 'selectionMode' property.

    How can I set the selectionMode for this TreeView?

    1 Reply Last reply
    0
    • ocgltdO ocgltd

      I'm building the QML file in QtCreator's text editor (I don't use designer) - but the QtCreator help for TreeView shows the QQC1 documentation.

      fcarneyF Offline
      fcarneyF Offline
      fcarney
      wrote on last edited by
      #6

      @ocgltd said in selectionMode property not available in TreeView 2:

      but the QtCreator help for TreeView shows the QQC1 documentation.

      That is really shitty. Contact qt for docs. This is a user forum and I don't think anyone here works for Qt. Are their docs in the build stuff for the module? Like a make docs or something?

      C++ is a perfectly valid school of magic.

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

        @ocgltd said in selectionMode property not available in TreeView 2:

        but this property is not recognized.

        Define what this means.
        Qt Creator is often stupid and doesn't recognize things that work fine.
        Is it failing in the console or just creator being stupid?
        What is the error message when it fails?

        Never mind, you are looking at the docs for TreeView from controls 1.4. Find the docs for the one from controls 2.x. I cannot find them.

        C++ is a perfectly valid school of magic.

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

          I think you are right. In that case, where do I set the selectionMode for the view?

          fcarneyF 1 Reply Last reply
          0
          • ocgltdO ocgltd

            I think you are right. In that case, where do I set the selectionMode for the view?

            fcarneyF Offline
            fcarneyF Offline
            fcarney
            wrote on last edited by
            #4

            @ocgltd I cannot find the docs. They are unavailable to me. Have you tried pressing F1 after clicking on TreeView in qml editor? They may have installed docs locally for it.

            C++ is a perfectly valid school of magic.

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

              I'm building the QML file in QtCreator's text editor (I don't use designer) - but the QtCreator help for TreeView shows the QQC1 documentation.

              fcarneyF 1 Reply Last reply
              0
              • ocgltdO ocgltd

                I'm building the QML file in QtCreator's text editor (I don't use designer) - but the QtCreator help for TreeView shows the QQC1 documentation.

                fcarneyF Offline
                fcarneyF Offline
                fcarney
                wrote on last edited by
                #6

                @ocgltd said in selectionMode property not available in TreeView 2:

                but the QtCreator help for TreeView shows the QQC1 documentation.

                That is really shitty. Contact qt for docs. This is a user forum and I don't think anyone here works for Qt. Are their docs in the build stuff for the module? Like a make docs or something?

                C++ is a perfectly valid school of magic.

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

                  There are quite a few problems with the TreeView 2 docs - there is already post already escalating this issue.

                  Even conceptually I'm unsure about how things work:

                  Shouldn't a selectionMode be tied to a view? The way I read the TreeView 2 docs the ItemSelectionModel is an independant object that I add/delete items to/from. In that case why bother with the 'flags' method in QAbstractItemModel? If I need to add/remove to/from the selection model on my own, can't I just ignore those flags? As well, shouldn't 2 views allow different items be selectable? (So why associated the selectable flag with the QAbstractItemModel)

                  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