Hello all,

I'm looking for a little help.

I have a QTreeWidget with a number of parents and numerous children, i.e.

parent1
-child
-child
- child
- child
parent2
-child
- child
parent3
-child

I'm using the contextMenuEvent to trigger a slot dependent upon the child picked. As such, I'm trying to determine which parent the child is associated with.

How can I cast the parent of the child even if it is a child of a child?

Cheers
Robbie