Results 1 to 12 of 12

Thread: Signal/Slots with PIMPL

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Aug 2011
    Posts
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Signal/Slots with PIMPL

    Qt ignores the signals and slotes defined in my source.cpp as they have to be defined in the source.h.

    If I add another Q_OBJECT inside Foo::FooPrivate I got a lot of Linker errors.

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Signal/Slots with PIMPL

    Qt ignores the signals and slotes defined in my source.cpp as they have to be defined in the source.h.
    The signals have to be declared in the header.
    The slots as well.

    The slots have to be defined in the source file.

    If I add another Q_OBJECT inside Foo::FooPrivate I got a lot of Linker errors.
    Show the errors you get.

    EDIT:
    Ah, i just now noticed this:
    My source file is build like:
    The class declaration has to be in a header file.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Doubts on signal and slots
    By divanshu in forum Newbie
    Replies: 2
    Last Post: 27th June 2011, 10:32
  2. Signal/Slots, Where can i use it?
    By Tio in forum Newbie
    Replies: 2
    Last Post: 25th May 2010, 01:36
  3. Signal and Slots
    By waynew in forum Newbie
    Replies: 3
    Last Post: 20th November 2009, 03:50
  4. signal and slots
    By vermarajeev in forum Qt Programming
    Replies: 4
    Last Post: 16th October 2007, 08:31
  5. Signal and slots
    By villy in forum Qt Programming
    Replies: 1
    Last Post: 12th January 2007, 10:10

Tags for this Thread

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.