Results 1 to 9 of 9

Thread: another Q_OBJECT and pointers (?)

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2006
    Posts
    5
    Thanks
    2
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: another Q_OBJECT and pointers (?)

    heh, i see
    so if i have f.ex. a myHBox class only used in myGroupBox class, which in its turn is accessed from myMainWindow and mySocket, than i need to have everything .h and .cpp except for myHBox for which a .cpp would be enough. is this correct?

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: another Q_OBJECT and pointers (?)

    Quote Originally Posted by caminoix
    except for myHBox for which a .cpp would be enough. is this correct?
    Yes, provided that it's the same file in which myGroupBox implementation was placed.

    One more thing: If you place a class definition with Q_OBJECT macro in somefile.cpp, then you must also add #include "somefile.moc" at the end of that file.

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

    caminoix (26th March 2006)

  4. #3
    Join Date
    Mar 2006
    Posts
    5
    Thanks
    2
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default Re: another Q_OBJECT and pointers (?)

    oh, ok. i think i sort of begin to get it. thanks

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.