Well, I'm not entirely sure, but from what I heard, QApplication's destructor provides that functionality. It's true C++ doesn't support this by itself, but the class can be defined to work just so.
About the dynamic allocation, the syntax implies that the following can be done (or in a similar way, not entirely sure whether it's this EXACT code).
Obviously you are incredibly smart and know when you need to instantiate a big object on the heap instead of the stack. If you're not, then you can just do trial and error once ;p
Has anyone ever even encountered such a type? The really large objects store just a minute fraction of their data in members. Most of it goes in the heap anyway, regardless of how the object was allocated.
Has anyone really been far even as decided to use even go want to do such a type?
@Catfish,
Even if that was a Java idiom, what would be wrong with that? I don't particularly like Java (but I <3 C#) but that doesn't mean it doesn't have any useful additions that can be brought into C++ (or at least, emulated in C++).
Doing something like #define extends : would be a bit different though.
I haven't used Qt for a while, so I'm not sure, but I think that I had got a segfault due to declaring my locals in a wrong order. Maybe a child widget's destructor does some cleanup with its parent, so if that gets destroyed first, it's a problem. I don't have Qt or even a C++ compiler installed currently to test it..
not shore, still learning Qt, but AFAIK setActiveWindow(textEdit) metod tels the application explicitly that this widget is main widget, means it has no parents.
all other widgets are textEdit's children.