Reg74 0 Light Poster

Here's the question :

/*    4. Modify your showTree() function so that it produces the same output as
         dumpObjectTree() .

        QObject::A Stack Object
            QObject::Mike
                 QObject::Greg
                 QObject::Peter
                 QObject::Bobby
            QObject::Carol
                QObject::Marcia
                QObject::Jan
                QObject::Cindy
*/

This is what i have thus far ...

 if(!childlst.isEmpty())
            foreach(Person* t,childlst)
            {
                cout << "QObject::" << t->parent()->objectName() << endl;
                cout << "    QObject::" << t->metaObject()->className() << endl;

            }  

I need someone to assist me in getting this function to output the same as using dumpObjectTree().

Thanks
Reggie