It is a bit complicated, but let me try to explain..
It seems that the QComboBoxPrivateContainer (which is combo boxes child, not the view's child) does not get instantiated right away. Actually it doesn't get instantiated until certain QComboBox's methods (for example view()/setView(), setEditable(), shopPopu()..) are called.
Try this:
addit(box, test);
box->view(); // or any other dummy call to force the private container to get instantiated
foreach
(QObject * cobj, box
->children
()) addit(cobj, test);
addit(box, test);
box->view(); // or any other dummy call to force the private container to get instantiated
foreach (QObject * cobj, box->children())
addit(cobj, test);
To copy to clipboard, switch view to plain text mode
Cheers!
Bookmarks