Results 1 to 2 of 2

Thread: Dynamic QTreeView

  1. #1
    Join Date
    Apr 2013
    Posts
    9
    Qt products
    Qt4 Qt5

    Default Dynamic QTreeView

    Hii

    I have a struct, which contains 6000 values.

    For Eg:

    struct
    {
    string main_group;
    string sub_group1;
    string parameters;
    }st
    {
    {ANTENNA, LINK, "CAGC"}...
    }

    I want to create a treeview, shown as below

    main_group1
    sub_group1
    para1
    para2
    para3

    subgroup2
    para1
    para2
    para3

    maingroup2
    .........

    How I will create a treeview dynamically. I have checked the examples of QT4. But, all the examples are showing by reading the data from a file. I want to read the values from struct.

    Its urgent. please help me....any code samples, please upload..

    Thanks

    Sree

  2. #2
    Join Date
    Mar 2011
    Location
    Hyderabad, India
    Posts
    1,882
    Thanks
    3
    Thanked 452 Times in 435 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows
    Wiki edits
    15

    Default Re: Dynamic QTreeView

    How I will create a treeview dynamically. I have checked the examples of QT4. But, all the examples are showing by reading the data from a file. I want to read the values from struct.
    So you have an example which reads from a file and populates the tree view, then just simple ready from struct (instead of file) and populate the tree view.
    When you know how to do it then you may do it wrong.
    When you don't know how to do it then it is not that you may do it wrong but you may not do it right.

Similar Threads

  1. QTreeView and dynamic context menu
    By dvlpr in forum Qt Programming
    Replies: 2
    Last Post: 17th July 2012, 09:01
  2. Replies: 0
    Last Post: 29th March 2012, 19:56
  3. Dynamic gui.
    By Niamita in forum Qt Programming
    Replies: 1
    Last Post: 2nd September 2011, 15:15
  4. Replies: 1
    Last Post: 20th January 2011, 17:17
  5. QTreeView + own model + dynamic filling
    By Urvin in forum Newbie
    Replies: 7
    Last Post: 19th February 2010, 17:11

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.