PDA

View Full Version : What's QAction's parameter "parent" mean?



FinderCheng
24th September 2009, 02:54
What's the parameter "parent" in its constructor mean? I looked up the API documents but didn't find out. I have read some code and found mostly it passed "this" pointer. So what's it exactly mean? what's its "parent"?
Thank you all!

Lykurg
24th September 2009, 04:38
this is only a shorthand for the current class, so the parent of the QActions is set to the class where the actions are created.
What's the use of it? You don't have to care about deleting them. If the parent is deleted, then automatic all children (=actions) are deleted also.