Results 1 to 2 of 2

Thread: A bout Q_Object?

  1. #1
    Join Date
    Jul 2014
    Posts
    95
    Thanks
    67

    Default A bout Q_Object?

    Hi Friends

    Exactly what is Q_Object?
    thanks.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: A bout Q_Object?

    It is a C++ preprocessor macro that has two complimentary features:

    1) the C++ preprocessor expands it into code, mainly function declarations, see qgobals.h
    2) it serves as a marker for the MOC code generation tool, which generates the implementation of these functions (and some a meta data object for the class)

    It is needed for QObject derived classes that declare their own signals and slots or their own Qt properties (using the Q_PROPERTY macro).

    Cheers,
    _

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

    rezas1000 (9th August 2014)

Similar Threads

  1. ask bout qserialdevice
    By azizbillah in forum Newbie
    Replies: 3
    Last Post: 2nd May 2012, 17:38
  2. why we need Q_OBJECT???
    By phillip_Qt in forum Qt Programming
    Replies: 9
    Last Post: 26th March 2009, 07:49
  3. When do I need Q_OBJECT?
    By Morea in forum Newbie
    Replies: 1
    Last Post: 24th February 2006, 08:15
  4. Q_object???
    By superutsav in forum Newbie
    Replies: 2
    Last Post: 21st February 2006, 13:29
  5. Q_object
    By Mariane in forum Newbie
    Replies: 5
    Last Post: 7th February 2006, 17:39

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.