问题
I've built a Qt custom widget
plugin found in a book "C++ programming with Qt 1st edition". When it finishes building I see a file "libiconeditorplugin.so" in /home/Itachi_dev/Qt/5.14.2/gcc_64/plugins/designer
TEMPLATE = lib
QT += designer widgets uiplugin
CONFIG += release plugin
HEADERS = ../iconeditor/iconeditor.h \
iconeditorplugin.h
SOURCES = ../iconeditor/iconeditor.cpp \
iconeditorplugin.cpp
RESOURCES = iconeditorplugin.qrc
DESTDIR = /home/Raindrop7/Qt/5.14.2/gcc_64/plugins/designer
DEFINES += HAVE_QT5
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS += target
But when I run Qt Creator it doesn't detect it! I've gone to Qt Creator->help->about plugins and didn't see it there.
I've tried the option: install library then I specify the file path to
libiconeditorplugin.o
it says invalid library file.I've install Qt-5.14.2 from their executable from the official website.
My OS: Linux fedora 33 x86_64.
Please help me at list give me some simple example on how to create a very simple custom widget and its plugin and how to make Qt Creator detect it and shows it in the "widgets box". Thank you!
来源:https://stackoverflow.com/questions/64902996/why-qt5-creator-doesnt-detect-my-custom-widget-plugin