Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. I am not able to see the data in Qtreeview customised
Forum Updated to NodeBB v4.3 + New Features

I am not able to see the data in Qtreeview customised

Scheduled Pinned Locked Moved Unsolved General and Desktop
4 Posts 3 Posters 510 Views 1 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.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #1

    I want a tree like as below

    0_1543058016883_Tree.png

    using a QtreeView cutomsize

    I have wrritten the code I am getting empty tree

    https://paste.ofcode.org/3aJjZiGCeHAhs6DPrKg85B

    Can some one help in debugging the issue

    1 Reply Last reply
    0
    • dheerendraD Offline
      dheerendraD Offline
      dheerendra
      Qt Champions 2022
      wrote on last edited by dheerendra
      #2

      I really appreciate your big code. Simple question for you. Did you try your custom model with QTreeView ? Does is it return data and shows in the QTreeView ?

      Also you can you try your Custom View with QStandardItemModel ? Does it work.

      If experiment these, it we can figure out who is real issue.

      Dheerendra
      @Community Service
      Certified Qt Specialist
      http://www.pthinks.com

      1 Reply Last reply
      0
      • Q Offline
        Q Offline
        Qt Enthusiast
        wrote on last edited by
        #3

        Yes
        It shows but in exapnsion it crashes

        Do we have a example of QtreeView with QAbstractModel where I can such

        suct tree view
        https://ddgobkiprc33d.cloudfront.net/06b72faf-20d4-47cc-992a-e02c8bf4a0f2.png

        1 Reply Last reply
        0
        • Christian EhrlicherC Offline
          Christian EhrlicherC Offline
          Christian Ehrlicher
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Qt-Enthusiast said in I am not able to see the data in Qtreeview customised:

          Do we have a example of QtreeView with QAbstractModel where I can such

          What's wrong with http://doc.qt.io/qt-5/qtwidgets-itemviews-simpletreemodel-example.html ?

          Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
          Visit the Qt Academy at https://academy.qt.io/catalog

          1 Reply Last reply
          1

          • Login

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