Results 1 to 18 of 18

Thread: pass "this" as parameter

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: pass "this" as parameter

    Quote Originally Posted by incapacitant
    Thanks for the hint which as it stands sounds chinese.
    So am banned from newbie.

    Are there plans for new newbies ?
    Learn C++

  2. #2
    Join Date
    Jan 2006
    Location
    Grenoble, France
    Posts
    165
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    106

    Default pass "this" as parameter

    I've got the books. Just started reading. I'll be back.

  3. #3
    Join Date
    Jan 2006
    Location
    Grenoble, France
    Posts
    165
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    106

    Default pass "this" as parameter

    Qt Code:
    1. Declare the function parameter as a base class of all Qt window classes. As you're learning C++ right now (:cool: ), I won't tell you which is it and I suggest others do the same. Find what is the base class of all Qt window classes and why does it work when you pass a pointer to the base class and then call the function with a subclass as a parameter.
    To copy to clipboard, switch view to plain text mode 

    Nice hint that I store carefully in a text file, however given my poor knowledge could you say the same thing in more words, in newbie terms ?
    Thanks

  4. #4
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    4
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: pass "this" as parameter

    It's as newbie as it can get. Just learn about classes, base classes (superclasses) and subclasses and look into Qt documentation and find the base class of all Qt top level windows.

  5. The following user says thank you to wysota for this useful post:

    incapacitant (25th May 2006)

Similar Threads

  1. How to declare SLOT as a parameter to member function?
    By QPlace in forum Qt Programming
    Replies: 2
    Last Post: 17th July 2018, 01:41
  2. Error: BadMatch --> what's it?
    By mattia in forum Newbie
    Replies: 4
    Last Post: 9th June 2008, 13:20

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
  •  
Qt is a trademark of The Qt Company.