schulzch/qml-ogdf

Adding plugin to project

Closed this issue · 2 comments

Hello.
I'm trying to add this plugin to my own project in following way:

  1. modified pro file:
DEPENDPATH      += \
                    $$PWD/../OGDF

QML_IMPORT_PATH += \
                    $$PWD/..
  1. OGDF folder added to project directory with built libs (on linux / win32) and copied qmldir from your src folder:
    OGDF$ ls
    libogdfplugin.so ogdfplugin.dll qmldir
  2. in main qml file :
import OGDF 1.0
  1. The odgf component are unknown for qt creator on linux and it is not possible to run the plugin.
  2. Windows can't find the fonts in /lib/fonts, so i added them from qt source.
  3. The output is still the same : qrc:/qml/main.qml:15:1: module "OGDF" is not installed

Ok, I just simply fixed it by compiling both Debug/Release versions separately in visual studio and i have copied it into my source folder
Problem was successfully solved by copying whole /ODGF folder using install rules:

OGDF.path    = $${DESTDIR}/OGDF
OGDF.files   += imports/OGDF/EdgeSpline.qml \
                imports/OGDF/GraphView.qml \
                imports/OGDF/qmldir
win32: {
CONFIG(debug, debug|release):{
OGDF.files   += imports/OGDF/ogdfplugind.dll
}
else{
OGDF.files   += imports/OGDF/ogdfplugin.dll
}
}
unix: {
OGDF.files   += imports/OGDF/ogdfplugin.so
}

OGDF folder content:
EdgeSpline.qml libogdfplugin.so ogdfplugin.exp ogdfplugind.dll
GraphView.qml ogdfplugin.dll ogdfplugin.lib qmldir

Great to hear you could fix your problems.