CustomTestWidget



  • I just create a test custom widget. but it doesnt install it as plugins as expected. I am using Qt 5.8.0 free version and did following

    1. Start QtCreator
    2. New Project -> Other Project -> Qt Custom Desginer Widget
    3. After creation this test custom project, I did not change anything.
    4. Following is CustomizeWidget.pro file
    CONFIG      += plugin debug_and_release
    TARGET      = $$qtLibraryTarget(qtestwidgetplugin)
    TEMPLATE    = lib
    
    HEADERS     = qtestwidgetplugin.h
    SOURCES     = qtestwidgetplugin.cpp
    RESOURCES   = icons.qrc
    LIBS        += -L. 
    
    greaterThan(QT_MAJOR_VERSION, 4) {
        QT += designer
    } else {
        CONFIG += designer
    }
    
    target.path = $$[QT_INSTALL_PLUGINS]/designer
    INSTALLS    += target
    
    include(qtestwidget.pri)
    
    1. After build the project. Netherless run qmake or Build All. Both failed copy *.dll to
      C:\Qt\Qt5.8.0\5.8\msvc2015\plugins\designer
    2. In C:\Qt\Qt5.8.0\5.8\msvc2015\plugins\designer is only qaxwidget.dll and qquickwidget.dll. Not mine test dll

    What did I wrong?


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Might be a silly question but did you call make install after building your plugin ?`


  • Qt Champions 2016

    Adding to @SGaist
    Or added it as a build step in Projects.
    alt text

    And its not such a silly question as for some reason I assumed if it had
    anything to install it would also do that automatically :)



  • Thx for all answer. It must be release version to be load by designer, right?

    Another question is

    modified pro file

    CONFIG      += plugin debug_and_release
    TARGET      = $$qtLibraryTarget(qtestwidgetplugin)
    TEMPLATE    = lib
    
    HEADERS     = qtestwidgetplugin.h
    SOURCES     = qtestwidgetplugin.cpp
    RESOURCES   = icons.qrc
    LIBS        += -L. 
    
    greaterThan(QT_MAJOR_VERSION, 4) {
        QT += designer
    } else {
        CONFIG += designer
    }
    
    target.path = $$[QT_INSTALL_PLUGINS]/designer
    
    QMAKE_POST_LINK += xcopy /d/y $$qtLibraryTarget(qtestwidgetplugin) $$(QTCREATOR_BIN_PATH)/plugins/designer
    
    INSTALLS    += target
    
    include(qtestwidget.pri)
    

    it result

    xcopy /d/y qtestwidgetplugin C:\Qt\Qt5.8.0\Tools\QtCreator\bin/plugins/designer Invalid number of parameters


  • Lifetime Qt Champion

    It must use the same version of Qt and compiler used to build Qt Creator and yes release.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.