005
07.05.2006, 22:08 Uhr
Spacelord
Hoffnungsloser Fall
|
Zumindest bei Qt 3.3(und damit arbeite ich) musste man dem Konstruktor noch nen Pointer auf das ParentWidget mitgeben. Wie das jetzt bei 4.x aussieht......keine Ahnung .
Zitat von C++ GUI Programming with Qt 3 : |
Qt’s parent–child mechanism is implemented in QObject, the base class of both QWidget and QLayout.When we create an object (a widget, layout, or other kind) with a parent, the parent adds the object to the list of its children. When the parent is deleted, it walks through its list of children and deletes each child. The children themselves then delete all of their children,and so on recursively until none remain. The parent–child mechanism simplifies memory management a lot, reducing the risk of memory leaks.
|
http://phptr.com/content/images/0131240722/downloads/blanchette_book.pdf
Gruss Spacelord -- .....Ich mach jetzt nämlich mein Jodeldiplom.Dann hab ich endlich was Eigenes. |