PDA

View Full Version : Dynamic QTreeView



krsree
22nd May 2013, 18:10
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

Santosh Reddy
23rd May 2013, 07:15
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.