English 中文(简体)
零工
原标题:Qt Plugins Not Working

我发明了一种习俗,它给植物粉碎。 The plugin includesvy with Qt Publishing, but when I edited the program, I m 带出这一错误:

“测试:无此类档案或目录”

在试验时,h 是习俗植被的名称。 我做了什么错误? 申请的是:

TEMPLATE = app
SOURCES += main.cpp 
    mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui

这是gin:

CONFIG      += designer plugin debug_and_release
TARGET      = $$qtLibraryTarget(testplugin)
TEMPLATE    = lib
HEADERS     = testplugin.h
SOURCES     = testplugin.cpp
RESOURCES   = icons.qrc
target.path = $$[QT_INSTALL_PLUGINS]/designer
INSTALLS    += target
include(test.pri)
最佳回答

在进行了广泛研究之后,我 st卑地 upon了这一read子:

rel=“noreferer” http://www.archivum.info/qt- interest@trolltech.com/2010-02/01398/Re-%28Qt- interest%29-Un Defin-vis-to-%28any-custom-widget%29.html

由此可见,当你汇编出一幅图象时,你获得的“批号”只是为了Qt造物/Qt设计器一体化的目的。 页: 1 你们应当提供另一个包含头盔和源代码的图书馆,或将其纳入贵项目。 因此,概括地说,这里是部署习惯植被的适当步骤:

  1. Create a library containing the custom widget s sources and headers. Let s call this library A. Alternatively, add the sources and headers to your project.
  2. Create the widget plugin for Qt Creator/Designer integration. Again, this plugin is NOT usable for anything other than Qt Creator/Designer integration.
  3. 在你的项目中,你必须增加以下内容。

    LIBS += C:[PATH TO LIBRARY S A BINARY]
    INCLUDEPATH += C:[PATH TO LIBRARY S A HEADERS]

再次通知你,你正在与图书馆A、NOT和图书馆联系,在你汇编植被图时,图书馆会接通。

问题回答

如果你能够看到你在设计者身上的植被,那么,你的gin子正在以你指定的方式工作。 你的问题基本上是,你重新编纂的方案可能没有发现你通过假肢补充的植被的主人档案。 答案可能是两点之一:

  • Add more of the path to the header in your plugin, so that programs which use the widget can find the header appropriately.
  • Add the path to the header file as an include path to your compiler, so the compiler can find the appropriate header when the program s files reference it.

我面临同样的问题。 然后,我试图在申请项目档案中明确增加所有主人档案和原始DLL文件。 它确定了这一问题。





相关问题
Qt: Do events get processed in order?

If I had a class A, where one of its functions does: void A::func() { emit first_signal(); emit second_signal(); } Assuming that a class B has 2 slots, one connected to first_signal, and the ...

How to determine how much free space on a drive in Qt?

I m using Qt and want a platform-independent way of getting the available free disk space. I know in Linux I can use statfs and in Windows I can use GetDiskFreeSpaceEx(). I know boost has a way, ...

Drag & drop with .ui files

I m having big troubles with drag & drop. I ve created a new Qt Designer Form Class in which I have one QListWidget and one QWidget. Now I want to enable dragging & dropping between these two ...

Link errors on Snow Leopard

I creating a small desktop application using Qt and Poco on Mac OS X Snow Leopard. Qt works fine, but once I started linking with Poco I get the following warning: ld: warning: in /Developer/SDKs/...

Showing two windows in Qt4

My friend and I have each created parts of a GUI using Qt 4. They both work independently and I am trying to integrate his form with the my main window. As of now this is the code I am using to try ...

Qt equivalent of .NET data binding?

Is there an equivalent of .NET s data binding in Qt? I want to populate some combo boxes and other widgets with QStrings that refer to specific entities in my database. However, it would be cleaner ...

热门标签