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. Re-engineer the Simple Tree Model
Forum Updated to NodeBB v4.3 + New Features

Re-engineer the Simple Tree Model

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.6k 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.
  • sajis997S Offline
    sajis997S Offline
    sajis997
    wrote on last edited by
    #1

    Hello forum,

    I believe that almost all of you have gone through the simple tree model example. It contains the nested hierarchies of the tree items.

    I need some hint and tips if i need to flat down the whole tree - whick means that all the items will be under one single parent QModelIndex().

    I think i need to have sub-class QAbstractProxyModel and i am getting confused about what to do do inside the mapToSource and mapFromSource() function.

    I have to traverse the source tree recursively and reparent all the source tree item to QModelIndex(). Do i have to do it inside the mapToSource() or inside mapFromSource(). Basically i think i am not sure what these two functions mean. The manual does not illuminate that much .

    I request some one who already has a strong grip over the the idea of concept to explain it for me or refer me to any material that did the job.

    Looking forward to your helping hand!!!

    Regards
    Sajjad

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      Perhaps "this":http://www.fioniasoftware.dk/blog/?p=51 will help?

      You can also have a look at the FlatModelProxy inside KDE.

      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