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. Treemodel transformation
Forum Updated to NodeBB v4.3 + New Features

Treemodel transformation

Scheduled Pinned Locked Moved General and Desktop
1 Posts 1 Posters 657 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.
  • D Offline
    D Offline
    D0IT
    wrote on last edited by
    #1

    Hello,

    I'm having huge difficulties getting the following to work:
    I have a QAIM subclass that takes a variable amount of QSqlQueryModel and models them into a tree (every QSqlQueryModel is simply a new tree level).
    I'm now having a tree like this (not exactly this, but just to give you an idea):
    Job data

    • Person data
      -- More specific person data
      everything from separate SQL tables.

    What I want to achieve is that data from some specified columns of the different level will be displayed as a child node in a new single row, so that you e.g. just see the person name as a sub note of the job and not all the information in several columns.

    I've started to subclass a QSortFilterProxyModel (since the final tree should be filter-/searchable), but am really stuck as to how to achieve this. The columnCount and rowCount functions are already implemented. But I don't see what exactly the other functions shall do / which of them I'll need to implement.

    If anyone has any input or examples / open source projects with comparable functionality I would really appreciate it.

    Thanks and kind regards,
    Robert

    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