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. QTableView + List with same model
QtWS25 Last Chance

QTableView + List with same model

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

    Hi,

    I'm developing a Qt Gui application. I want to use a listview side by side a tableview. I will list title's of my data in the listview, when user clicks on an item, its child items will be shown on a tableview.

    For example i have 3 parent items with its childs as follows.

    • Example Title 1
      - 1 name1 age1 year1 email1
      - 2 name2 age2 year2 email2
      - 3 name3 age3 year3 email3
    • Example Title 2
      - 4 name4 age4 year4 email4
      - 5 name5 age5 year5 email5
      - 6 name6 age6 year6 email6
    • Example Title 3
      - 7 name7 age7 year7 email7
      - 8 name8 age8 year8 email8
      - 9 name9 age9 year9 email9

    Listview will list ony Example Title 1 ,2 and 3. When user click on Example Title 1, Qtableview will be filled with its childs ( name1 age1 year1 email1 , name2 age2 year2 email2, name3 age3 year3 email3) with proper column names.

    I can do this by using 2 seperate listmodel and tablemodel, but i need to combine them. Is there any better solution to my problem? I don't have to use listview it can be a widget too.

    !http://oi62.tinypic.com/2zoad1l.jpg(thanks to my extraordinary paint skills)!

    thanks.

    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