Qt示例(世界时间时钟插件示例)通知错误:找不到可执行文件,请指定一个

时间:2019-06-27 10:12:28

标签: c++ qt

我需要了解有关在新的主窗口小工具中使用现成的编写的小部件的更多信息,所以我已经达到{{ 1}},例如,我需要运行以下示例: link descriptions 文件 worldtimeclockplugin.pro 是:

Custom Widget Plugin

World Time Clock Plugin Example

Qt,但是当我想通过发布模式运行它时,我得到找不到可执行文件,请指定一个通知:

enter image description here

所以我找到了 Could not find the executable please specify one来解决这个问题:

  

应该编译为该插件不是可执行文件,因此qt   找不到可以执行的文件。解决方案是:解决方案

     

通常,只有“ build”不会“运行”,以免污染   源代码,将创建一个构建文件夹来存储已编译的   代码,然后在构建文件夹中使用。

#! [0]
QT          += widgets uiplugin
#! [0]

QTDIR_build {
# This is only for the Qt build. Do not use externally. We mean it.
PLUGIN_TYPE = designer
PLUGIN_CLASS_NAME = WorldTimeClockPlugin
load(qt_plugin)
CONFIG += install_ok
} else {
# Public example:

TARGET      = $$qtLibraryTarget($$TARGET)
#! [1]
CONFIG     += plugin
TEMPLATE    = lib
#! [1]

target.path = $$[QT_INSTALL_PLUGINS]/designer
#target.path =/home/so/Qt/5.12.3/gcc_64/plugins/designer

INSTALLS += target

}

#! [2]
HEADERS     = worldtimeclock.h \
              worldtimeclockplugin.h
SOURCES     = worldtimeclock.cpp \
              worldtimeclockplugin.cpp
#! [2]

现在我进入了发布文件夹:

  

/home/so/Qt/Examples/Qt-5.12.3/designer/build-worldtimeclockplugin-Desktop_Qt_5_12_3_GCC_64bit2-Release/tras

我做Sudo make install ,得到以下输出:

sudo make install

它已创建/home/so/Qt/5.12.3/gcc_64/bin/qmake -install qinstall -exe libworldtimeclockplugin.so /home/so/Qt/5.12.3/gcc_64/plugins/designer/libworldtimeclockplugin.so strip --strip-unneeded /home/so/Qt/5.12.3/gcc_64/plugins/designer/libworldtimeclockplugin.so 文件,该文件夹如下所示:

this instruction

但是我已经收到通知了。

我该怎么办?我该如何解决这个问题?

0 个答案:

没有答案