Results 1 to 2 of 2

Thread: What's QAction's parameter "parent" mean?

  1. #1
    Join Date
    Sep 2009
    Location
    Nanjing, China
    Posts
    46
    Thanks
    12
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default What's QAction's parameter "parent" mean?

    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!

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: What's QAction's parameter "parent" mean?

    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.

  3. The following user says thank you to Lykurg for this useful post:

    FinderCheng (24th September 2009)

Similar Threads

  1. application parameter problem..
    By triperzonak in forum Newbie
    Replies: 7
    Last Post: 9th February 2009, 01:56
  2. Replies: 1
    Last Post: 18th December 2008, 10:25
  3. Error: BadMatch --> what's it?
    By mattia in forum Newbie
    Replies: 4
    Last Post: 9th June 2008, 12:20
  4. Problems with QActions and Pixmaps
    By ToddAtWSU in forum Qt Programming
    Replies: 8
    Last Post: 11th April 2007, 21:53
  5. const function parameter problems
    By stevey in forum General Programming
    Replies: 3
    Last Post: 18th December 2006, 22:22

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.