Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Entries in TreeView are not showing expand icon (Nor functional for expanding) after updating from Qt 5.6 to Qt 5.13

Entries in TreeView are not showing expand icon (Nor functional for expanding) after updating from Qt 5.6 to Qt 5.13

Scheduled Pinned Locked Moved Solved Game Development
6 Posts 2 Posters 1.5k Views
  • 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.
  • C Offline
    C Offline
    chrisbegames
    wrote on last edited by
    #1

    Hey everyone,

    Reaching out about the problem I put in the subject. An overview of my issue:

    • We have a file browser in our game Editor that pretty much displays a standard file tree hierarchy to the user (Same window hierarchy), nothing too complicated. The UI classes are structured in the following matter:

      - We have a "Browser Window" which is just a QWidget. It is defined by a .ui file.
      - The .ui file class defines a QTreeView. This view sets its model to QSortFilterProxyModel, which sets its source model to a QAbstractTableModel
      - Each entry in the QTreeView is a "FileAssetEntry", which is just a QObject
      

    After we updated Qt from 5.6 to 5.13, the top level folders that have children items stopped rendering the "expand arrow". Even double clicking is not causing any sort of expansion whatsoever. Interesting enough, running a text search filter works as expected; as in the filter knows the files are under a specific folder, but is not rendering them (The top level folders are showing, but still with the same issue). You can tell since folders that do not have the files are removed from display.

    I am not sure of what to look for, but so far I have done the following:

       - I verified that all the assets are getting added through beginInsertRows in the QAbstractTableModel.
       - I tested making the QTreeView point to the QAbstractTableModel directly to bypass the filter. The issue was still present.
       - I do not see any Qt warnings in our build logs.
    

    Again, not sure what to look for since I am not too experienced with Qt. Are there any "version update" checklist guidelines that can help? We might have missed some steps on making sure all the .ui files are still supported? Do we need to recompile the .moc files?

    Any insight is highly appreciated. Please let me know what other information I can provide to ease support on this.

    Cheers,

    Christian

    1 Reply Last reply
    0
    • C chrisbegames

      Hey SGaist,

      Thanks for the recommendation. The issue is not present with Qt 5.12.4. However, we have a new tool that relies in 5.13.

      What would be the best way to figure out what the culprit is?

      C Offline
      C Offline
      chrisbegames
      wrote on last edited by
      #4

      Hey @SGaist

      So I tested one last thing that resolved the issue. Our model was inheriting from QAbstractTableModel. I changed it to inherit directly from QAbstractItemModel and that resolved the issue.

      I am very curious now to understand what was causing the problem, but I am glad is at least narrowed down to that.

      Cheers,

      Christian

      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by SGaist
        #2

        Hi,

        One thing you could do is to test with the current LTS release which is Qt 5.12.4.

        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
        0
        • C Offline
          C Offline
          chrisbegames
          wrote on last edited by
          #3

          Hey SGaist,

          Thanks for the recommendation. The issue is not present with Qt 5.12.4. However, we have a new tool that relies in 5.13.

          What would be the best way to figure out what the culprit is?

          C 1 Reply Last reply
          0
          • C chrisbegames

            Hey SGaist,

            Thanks for the recommendation. The issue is not present with Qt 5.12.4. However, we have a new tool that relies in 5.13.

            What would be the best way to figure out what the culprit is?

            C Offline
            C Offline
            chrisbegames
            wrote on last edited by
            #4

            Hey @SGaist

            So I tested one last thing that resolved the issue. Our model was inheriting from QAbstractTableModel. I changed it to inherit directly from QAbstractItemModel and that resolved the issue.

            I am very curious now to understand what was causing the problem, but I am glad is at least narrowed down to that.

            Cheers,

            Christian

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #5

              So you were trying to render a table model in a tree view ?

              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
              0
              • C Offline
                C Offline
                chrisbegames
                wrote on last edited by
                #6

                Apparently.

                This was working before. Looking through the documentation it seems this was not the best use case for the tree view so it looks like a safe change on our side.

                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