Results 1 to 8 of 8

Thread: Problem with Parent QWidget and Buttons not working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2007
    Posts
    209
    Thanks
    34
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem with Parent QWidget and Buttons not working

    Thanks thats what was missing, I thought Q_OBJECT is only if i use SLOT/SIGNALs.

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Problem with Parent QWidget and Buttons not working

    Quote Originally Posted by VireX View Post
    I thought Q_OBJECT is only if i use SLOT/SIGNALs.
    Not only those, but also other meta-object system stuff (see Meta-Object System and QMetaObject).
    Quote Originally Posted by http://doc.trolltech.com/4.2/qobject.html#Q_OBJECT
    The Q_OBJECT macro must appear in the private section of a class definition that declares its own signals and slots or that uses other services provided by Qt's meta-object system.
    J-P Nurmi

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

    Default Re: Problem with Parent QWidget and Buttons not working

    Quote Originally Posted by jpn View Post
    Not only those, but also other meta-object system stuff (see Meta-Object System and QMetaObject).
    Or the other way round as signals and slots use the meta-object system and not vice versa. So Q_OBJECT enables creation of a meta-object for the class which implies an ability to declare signals and slots.

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.