Results 1 to 2 of 2

Thread: QtDesigner Custom Widget problem on use in another app

  1. #1
    Join Date
    Jul 2006
    Posts
    126
    Thanks
    17
    Thanked 4 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QtDesigner Custom Widget problem on use in another app

    Hi, I've done a Custom Widget from scratch, and it works fine in QtDesigner, but when I use it in a application I can't. I have tried to put .h and .cpp in ui_....h files but in compiling I get this errors:

    ./release\imagen.o(.text+0x384):imagen.cpp: undefined reference to `Imagen::staticMetaObject'
    ./release\imagen.o(.text+0x1062):imagen.cpp: undefined reference to `vtable for Imagen'
    ./release\imagen.o(.text+0x1069):imagen.cpp: undefined reference to `vtable for Imagen'
    ./release\imagen.o(.text+0x114a):imagen.cpp: undefined reference to `Imagen::staticMetaObject'
    ./release\imagen.o(.text+0x128e):imagen.cpp: undefined reference to `Imagen::staticMetaObject'
    ./release\imagen.o(.text+0x1822):imagen.cpp: undefined reference to `vtable for Imagen'
    ./release\imagen.o(.text+0x1829):imagen.cpp: undefined reference to `vtable for Imagen'
    ./release\imagen.o(.text+0x190a):imagen.cpp: undefined reference to `Imagen::staticMetaObject'
    ./release\imagen.o(.text+0x1a4e):imagen.cpp: undefined reference to `Imagen::staticMetaObject'

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QtDesigner Custom Widget problem on use in another app

    It looks like you didn't run moc on imagen.h.

Similar Threads

  1. Replies: 3
    Last Post: 12th April 2006, 08:20
  2. Problem reimplementing QSpinBox in a custom widget
    By hvengel in forum Qt Programming
    Replies: 1
    Last Post: 30th March 2006, 08:12
  3. Replies: 4
    Last Post: 24th March 2006, 22:50
  4. Problem with custom widget
    By jnana in forum Qt Programming
    Replies: 3
    Last Post: 15th March 2006, 11:55
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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.