Why Qt5 creator doesn't detect my custom widget plugin?

安稳与你 提交于 2021-02-05 10:37:06

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!