Results 1 to 2 of 2

Thread: Custom Qwt based widget for Designer

  1. #1
    Join Date
    Mar 2012
    Posts
    14
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Custom Qwt based widget for Designer

    Hi all,

    I followed the Custom Widged Plugin Example - http://qt-project.org/doc/qt-4.8/des...getplugin.html, then tried to modify it, replacing class AnalogClock with a QwtPlot based class, Creator is reporting the following. Project files are appended.

    So I would like to ask for help in understand what's the problem with MyQwtPlot's constructor/destructor.

    Thanks in advance.

    Qt Code:
    1. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0x8): undefined reference to `QwtPlot::metaObject() const'
    2. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0xc): undefined reference to `QwtPlot::qt_metacast(char const*)'
    3. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0x10): undefined reference to `QwtPlot::qt_metacall(QMetaObject::Call, int, void**)'
    4. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0x1c): undefined reference to `QwtPlot::event(QEvent*)'
    5. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0x40): undefined reference to `QwtPlot::sizeHint() const'
    6. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0x44): undefined reference to `QwtPlot::minimumSizeHint() const'
    7. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0x8c): undefined reference to `QwtPlot::resizeEvent(QResizeEvent*)'
    8. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0xe8): undefined reference to `QwtPlot::canvasMap(int) const'
    9. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0xec): undefined reference to `QwtPlot::updateLayout()'
    10. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0xf0): undefined reference to `QwtPlot::drawCanvas(QPainter*)'
    11. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0xf4): undefined reference to `QwtPlot::drawItems(QPainter*, QRectF const&, QwtScaleMap const*) const'
    12. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0xf8): undefined reference to `QwtPlot::replot()'
    13. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0xfc): undefined reference to `QwtPlot::legendItemClicked()'
    14. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0x100): undefined reference to `QwtPlot::legendItemChecked(bool)'
    15. debug/customwidgetplugin.o:customwidgetplugin.cpp:(.rdata$_ZTV9MyQwtPlot[vtable for MyQwtPlot]+0x104): undefined reference to `QwtPlot::updateTabOrder()'
    16. debug/customwidgetplugin.o: In function `~MyQwtPlot':
    17. C:\Documents and Settings\cristiano.strieder\Meus documentos\QtProjects\CustomWidgetPluginExample/myqwtplot.h:8: undefined reference to `QwtPlot::~QwtPlot()'
    18. C:\Documents and Settings\cristiano.strieder\Meus documentos\QtProjects\CustomWidgetPluginExample/myqwtplot.h:8: undefined reference to `QwtPlot::~QwtPlot()'
    19. debug/myqwtplot.o: In function `MyQwtPlot':
    20. C:\Documents and Settings\cristiano.strieder\Meus documentos\QtProjects\CustomWidgetPluginExample/myqwtplot.cpp:5: undefined reference to `QwtPlot::QwtPlot(QWidget*)'
    21. C:\Documents and Settings\cristiano.strieder\Meus documentos\QtProjects\CustomWidgetPluginExample/myqwtplot.cpp:5: undefined reference to `QwtPlot::QwtPlot(QWidget*)'
    22. collect2: ld returned 1 exit status
    23. mingw32-make.exe[1]: *** [c:\QtSDK\QtCreator\bin\plugins\designer\customwidgetplugin.dll] Error 1
    24. mingw32-make.exe: *** [debug] Error 2
    25. 08:13:40: The process "C:\QtSDK\mingw\bin\mingw32-make.exe" exited with code 2.
    26. Error while building project customwidgetplugin (target: Desktop)
    27. When executing build step 'Make'
    To copy to clipboard, switch view to plain text mode 
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Custom Qwt based widget for Designer

    your plugin has to link to Qwt since it depends on it.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Replies: 2
    Last Post: 27th July 2011, 15:49
  2. Replies: 1
    Last Post: 23rd June 2011, 23:09
  3. Replies: 1
    Last Post: 6th May 2010, 10:09
  4. Replies: 2
    Last Post: 30th July 2009, 04:58
  5. QT4: Custom widget for QT Designer
    By Michiel in forum Qt Tools
    Replies: 4
    Last Post: 4th May 2006, 13: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.