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

24th September 2009, 03: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!

24th September 2009, 05: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.