Thread
:
Qt: ridiculous behaviour
View Single Post
gri
2010-05-19 , 07:57
Posts: 190 | Thanked: 129 times | Joined on Mar 2010 @ Bavaria, Germany
#
11
Parent can be any class that inherits from QObject. QWidgets are inherited from QObject, so yes.
If you create a dialog, give all member pointer variables the dialog as parent and you don't have to care about their memory
With Qt the memory handling is a lot easier than with blank c++.
PS: You could also take a look at QSharedPointer when using non-QObject classes. (or boost::shared_ptr if you don't like the Qt implementation)
Quote & Reply
|
gri
View Public Profile
Send a private message to gri
Find all posts by gri