Results 1 to 6 of 6

Thread: Testing a custom Plugin

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Posts
    18
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    4

    Default Re: Testing a custom Plugin

    I have subclassed QTableWidget and have made a designer plugin called EnhancedTableWidget.

    I have successfully compiled the designer plugin and copied the two files

    enhancedtablewidget.dll
    libenhancedtablewidget.a

    to the $QTDIR\plugins\designer directory.

    I can create a new form with my new widget on it.

    When I try and compile a simple example using Maluta's main.cpp I get the following error:

    release\main.o(.text+0x267):main.cpp: undefined reference to `EnhancedTableWidget::EnhancedTableWidget(QWidget* )'

    Here is my current .pro file

    Qt Code:
    1. TEMPLATE = app
    2. QT += sql
    3. TARGET =
    4. DEPENDPATH += .
    5. INCLUDEPATH += .
    6.  
    7. # Input
    8. HEADERS += enhancedtablewidget.h
    9. FORMS += form.ui
    10. SOURCES += main.cpp
    11. LIBS += C:/Devel/Qt/4.2.0/plugins/designer/libenhancedtablewidgetplugin.a
    To copy to clipboard, switch view to plain text mode 

    I am using Qt4.2.0 on Windows XP with mingw.

    Thanks,
    Royce

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

    Default Re: Testing a custom Plugin

    Quote Originally Posted by Royceybaby View Post
    I am using Qt4.2.0 on Windows XP with mingw.
    Since you use windows, make sure you have proper __declspec directive between "class" and "EnhancedTableWidget".

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

    Royceybaby (6th November 2006)

Similar Threads

  1. problem loading custom plugin on Qt Designer 4
    By raman_31181 in forum Qt Tools
    Replies: 18
    Last Post: 26th September 2008, 10:42
  2. custom plugin load fails...
    By raman_31181 in forum Qt Tools
    Replies: 3
    Last Post: 3rd July 2008, 10:37
  3. QPluginLoader not recognizing a plugin
    By KShots in forum Qt Programming
    Replies: 3
    Last Post: 29th June 2007, 15:13
  4. Replies: 2
    Last Post: 25th August 2006, 12:35
  5. Custom plugin for a layout
    By cocheci in forum Qt Tools
    Replies: 2
    Last Post: 12th June 2006, 19:36

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
  •  
Qt is a trademark of The Qt Company.