PDA

View Full Version : How can merge two Tree Views?



zjamshidi
16th May 2012, 11:01
Hello
I have a tree view. I need that when one row is expanded, another tree view shows up. This second tree view's columns are different from the main tree view both in number and title.

In fact I have two table in SQL. One column in the first table is foreign key in another one and the relationship is one-to-many.
I need to expand the primary key and all rows in the second table shows up!

Any suggestion?!

tferreira
16th May 2012, 11:24
The faster answer I can give you is to use events :)
Try to connect to the QTreeView's expanded(QModelIndex) or collapsed(QModelIndex) signals.