Results 1 to 2 of 2

Thread: Link error with Q_OBJECT

  1. #1
    Join Date
    Nov 2013
    Posts
    12
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Link error with Q_OBJECT

    Hello,

    I am getting the link error, when i am adding Q_OBJECT.
    and please suggest me how to proceed further, without removing Q_OBJECT.



    Thanks ..

    below is the error type

    unresolved external symbol "public: virtual struct QMetaObject const * __thiscall IconWidget::metaObject(void)const " (?metaObject@IconWidget@@UBEPBUQMetaObject@@XZ)

  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: Link error with Q_OBJECT

    Is your header properly added to the HEADERS variable in your .pro file?
    Have you tried re-running qmake?

    Cheers,
    _

Similar Threads

  1. Simple demo won't link - undef vtable and Q_OBJECT
    By DrunkenUFOPilot in forum Newbie
    Replies: 3
    Last Post: 14th January 2011, 23:57
  2. link error LNK2001 with Q_OBJECT
    By mioan in forum Newbie
    Replies: 3
    Last Post: 17th May 2009, 23:52
  3. Q_OBJECT does'nt link
    By bnilsson in forum Qt Programming
    Replies: 2
    Last Post: 16th July 2008, 20:22
  4. error using Q_OBJECT
    By wrproject in forum Newbie
    Replies: 16
    Last Post: 9th July 2008, 20:44
  5. Q_OBJECT macro and link errors
    By pscheven in forum Qt Programming
    Replies: 4
    Last Post: 21st March 2008, 13:23

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.