I'm trying to write a plugin for KDevelop and I'm having an interface problem. Whenever I include QInterfaces(KDevelop::"Interface" I get an undefined interface error when doing the MOC step. Any ideas what going on? This also happens if I compile one of the kdevelop plugins as a single entity that was packaged with the kdevelop source code. I must be missing some linker option or library or something. Any ideas?
Qt Interface: undefined interface error
5.8k views Asked by JC2 At
3
There are 3 answers
0
On
Occurred to me that I've got "Error: Undefined interface" from moc regarding file that was targeted towards multiple Qt versions.
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
#include <QtUiPlugin/QDesignerCustomWidgetInterface>
#else
#include <QDesignerCustomWidgetInterface>
#endif
The outcome was that C++ precompiler manages to evaluate QT_VERSION_CHECK macro, but moc does NOT. You need to re-phrase condition as direct version number
#if (QT_VERSION >= 0x050500)
this way C++ and moc can do the job and includes the file
i get
error: Undefined interface
from MOC when an include file is missingfixed by adding