Results 1 to 3 of 3

Thread: SIGNALS in Inherit Classes

  1. #1
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default SIGNALS in Inherit Classes

    Hi,
    I'm not able to define SIGNALS in inherit classes. I have defined the macro Q_OBJECT, and the class is inherithed from other class that inherits QObject.

    Have I to define the SIGNALS in the base class? This is the only way that works.

    There is no problem defining them on the base class but I would like to define them into the inherited class.

    Thanks,
    Òscar Llarch i Galán

  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: SIGNALS in Inherit Classes

    How are you not able? What's the error?

    Is the class declaration in a separate header file? Have you re-run qmake after adding the Q_OBJECT macro?
    Edit: also, make sure the header is listed in HEADERS in .pro file.
    Last edited by jpn; 27th November 2006 at 15:57. Reason: updated contents
    J-P Nurmi

  3. #3
    Join Date
    Jan 2006
    Location
    Sta. Eugènia de Berga (Vic - Barcelona - Spain)
    Posts
    869
    Thanks
    70
    Thanked 59 Times in 57 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: SIGNALS in Inherit Classes

    Oh, sorry, I have not added the macro Q_OBJECT in the inherited classes, I think that I wrote it, ...

    Thanks,
    Òscar Llarch i Galán

Similar Threads

  1. QtTest: Unittesting in several classes
    By Jojo in forum Qt Programming
    Replies: 2
    Last Post: 25th August 2009, 12:38
  2. Inherit and Overwrite signals
    By shaselsc in forum Qt Programming
    Replies: 1
    Last Post: 9th October 2006, 15:39
  3. Signals and Slots in dll
    By ankurjain in forum Qt Programming
    Replies: 8
    Last Post: 29th March 2006, 08:12
  4. Problem with Signals and Slots
    By Kapil in forum Newbie
    Replies: 11
    Last Post: 15th February 2006, 11:35
  5. KDE Signals
    By chombium in forum KDE Forum
    Replies: 1
    Last Post: 25th January 2006, 18:45

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.