Hi
I have a Qlistview which has items in it. Each item has its children like:
a
b
c
d
d1
d2
e

d has for example two children. My problem is that when i want to select the item d
that its children should also be selected. Here comes my code:

Qt Code:
  1. QListViewItemIterator it(mylistview, QListViewItemIterator::Selected);
  2. while( it.current())
  3. {
  4. MyClass * p1 = ((MyListViewItem*)it.current())->getP1();
  5. MyClass * p2 = ((MyListViewItem*)it.current())->getP2();
  6. if ( p1 )
  7. {
  8. // code
  9. }
  10. if ( p2 )
  11. // code
  12.  
  13. it++;
  14. }
To copy to clipboard, switch view to plain text mode 

Can someone please direct me how to select the children of the items in above situation?
Regards,