Well, yes it is, in a way. MyWidget is derived from QWidget and then from QObject, so I would expect that the body of ~QObject would be executed before the bodies of ~QWidget and ~MyWidget. This would imply that the children of the "top" widget (and the "a" widget) would be destructed by ~QObject (and thus their MyWidget destructors would execute) prior to the body of the MyWidget destructor for "top" getting executed. Thus the qDebug() statements should be issued in the order I stated.This isn't a demo of c++ inheritance hierarchy, it is Qt parent-child hierarchy example.
I guess I'll just have to build this example and step through it in the debugger.
Edit -- never mind - see my edit a few posts above. I'll just slink away with my tail between my legs and work on why I can't get OpenGL textures to display in a QGLWidget.




Reply With Quote
Bookmarks