Results 1 to 3 of 3

Thread: Q_OBJECT does'nt link

  1. #1
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Q_OBJECT does'nt link

    A new class I created does not link in if I include the Q_OBJECT macro:
    Qt Code:
    1. class PAMS_Settings : public QDialog , public Ui::SettingsDialog
    2. {
    3. Q_OBJECT
    4.  
    5. public:
    To copy to clipboard, switch view to plain text mode 
    "vtable for PAMS_Settings", referenced from:
    __ZTV13PAMS_Settings$non_lazy_ptr in settings.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status
    If I leave it out it links but then my signals does't work.
    Has anyone seen this before and give me a hint?

    BN
    MacOSX user dabbling with Linux and Windows.

  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: Q_OBJECT does'nt link

    Did you re-run qmake after adding Q_OBJECT?
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    bair (27th March 2009)

  4. #3
    Join Date
    Jan 2008
    Posts
    155
    Thanks
    4
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Q_OBJECT does'nt link

    Apparently not.
    I removed all build files, the Xcode project itself and did qmake.
    Then it all built ok.

    Thanks.
    MacOSX user dabbling with Linux and Windows.

Similar Threads

  1. ignore following link in anchorClicked()
    By jh in forum Qt Programming
    Replies: 4
    Last Post: 16th July 2006, 16:33
  2. LINK : fatal error LNK1181: can't open 'delayimp.lib'
    By fcamlar in forum Installation and Deployment
    Replies: 10
    Last Post: 7th July 2006, 13:04
  3. Text Browser Link Question
    By taylor34 in forum Qt Programming
    Replies: 2
    Last Post: 20th June 2006, 19:54
  4. Problem with libmng on static link
    By jlbrd in forum Installation and Deployment
    Replies: 2
    Last Post: 10th May 2006, 22:38

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.