Results 1 to 4 of 4

Thread: help with signals and slots

  1. #1
    Join Date
    Jan 2006
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question help with signals and slots

    Hi,

    I'm trying to create a class which includes signals and slots. I get the following errors on compilation. Please help.

    Qt Code:
    1. main.o(.text+0x56d5): In function `controls::controls[not-in-charge](QWidget*)':
    2. /home/utsav/FYP/final/controls.cpp:13: undefined reference to `vtable for controls'
    3. main.o(.text+0x56e1):/home/utsav/FYP/final/controls.cpp:13: undefined reference to `vtable for controls'
    4. main.o(.text+0x59bd): In function `controls::controls[in-charge](QWidget*)':
    5. /home/utsav/FYP/final/controls.cpp:13: undefined reference to `vtable for controls'
    6. main.o(.text+0x59c9):/home/utsav/FYP/final/controls.cpp:13: undefined reference to `vtable for controls'
    7. main.o(.text+0x5f52): In function `controls::emitvalue()':
    8. /home/utsav/FYP/final/controls.cpp:76: undefined reference to `controls::triggered(int)'
    9. main.o(.gnu.linkonce.t._ZN8controlsD1Ev+0xc): In function `controls::~controls [in-charge]()':
    10. /usr/local/Trolltech/Qt-4.1.0/include/QtCore/qpoint.h:101: undefined reference to `vtable for controls'
    11. main.o(.gnu.linkonce.t._ZN8controlsD1Ev+0x18): In function `controls::~controls [in-charge]()':
    12. /usr/local/Trolltech/Qt-4.1.0/include/QtGui/qcolor.h:217: undefined reference to `vtable for controls'
    To copy to clipboard, switch view to plain text mode 


    Thanks
    superutsav
    He who laughs last thinks slowest.

  2. #2
    Join Date
    Jan 2006
    Location
    Ukraine, L'viv
    Posts
    57
    Thanks
    3
    Thanked 4 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: help with signals and slots

    Didn't you forget Q_OBJECT in your class with signals and slots?

  3. #3
    Join Date
    Jan 2006
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question Re: help with signals and slots

    Quote Originally Posted by L.Marvell
    Didn't you forget Q_OBJECT in your class with signals and slots?
    I have put Q_OBJECT in the class declaration. It still gives the erorrs.

    Thanks
    superutsav
    He who laughs last thinks slowest.

  4. #4
    Join Date
    Jan 2006
    Posts
    22
    Thanks
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: help with signals and slots

    Got it... apparently you have to also run qmake -project, before qmake, make when u include signals and slots.
    Thanks for the help
    superutsav
    He who laughs last thinks slowest.

Similar Threads

  1. Signals and Slots Problem
    By GenericProdigy in forum Qt Programming
    Replies: 4
    Last Post: 2nd February 2009, 09:06
  2. Signals and Slots
    By 83.manish in forum Qt Programming
    Replies: 3
    Last Post: 30th June 2008, 10:31
  3. Problem with SpinBox signals and slots
    By ramstormrage in forum Newbie
    Replies: 4
    Last Post: 2nd May 2008, 01:45
  4. signals and slots in plugins
    By anderl in forum Qt Programming
    Replies: 1
    Last Post: 10th October 2007, 13:57
  5. Problem with Signals and Slots
    By Kapil in forum Newbie
    Replies: 11
    Last Post: 15th February 2006, 11:35

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.