Results 1 to 2 of 2

Thread: tableView shows hierarchical model

  1. #1
    Join Date
    Jan 2015
    Posts
    8
    Thanks
    7
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default tableView shows hierarchical model

    Hi there,

    Using "QStandardItemModel(2,2,this)" I made a model in which each item is a parent for another item.
    I want to have some views: one tree view to show the whole data, and several Table views each showing one child of the model.
    The three view is easy. However, I don't know how to make tableView to show a child. "ui->tableView->setModel(model);" shows the top level, but is need to pass sub levels to the table.

    Thanks,
    Omid

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: tableView shows hierarchical model

    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  3. The following user says thank you to wysota for this useful post:

    Omid123 (12th February 2015)

Similar Threads

  1. QLineEdit shows always the end, how shows start ?
    By Alundra in forum Qt Programming
    Replies: 8
    Last Post: 19th June 2015, 12:09
  2. Tableview after Model move section
    By poporacer in forum Newbie
    Replies: 5
    Last Post: 14th September 2011, 01:13
  3. tableview , model and owncolumn
    By maston in forum Qt Programming
    Replies: 6
    Last Post: 28th August 2010, 11:00
  4. Replies: 0
    Last Post: 21st April 2010, 12:23
  5. hierarchical model in a flat view
    By gniking in forum Qt Programming
    Replies: 4
    Last Post: 10th November 2009, 20:17

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.