CustomTestWidget
Solved
General and Desktop
-
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
- Start QtCreator
- New Project -> Other Project -> Qt Custom Desginer Widget
- After creation this test custom project, I did not change anything.
- 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)
- 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 - 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?
-
Hi and welcome to devnet,
Might be a silly question but did you call
make install
after building your plugin ?` -
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
-
It must use the same version of Qt and compiler used to build Qt Creator and yes release.