Skip to content

Usage inside CMake Qt project #92

@igor-krawczuk

Description

@igor-krawczuk

Hi,this is probably related #55 , although to be honest I didn't understand how to solve my problem from reading the thread (i.e. how to deploy as a plugin).

Is there any place I can check in order to get QuickQanava integrated into a CMakeLists.txt qt project? I currently use the following lines in my CmakeLists.txt

include_directories("/usr/local/include/quickqanava")
include_directories("/usr/local/include/quickcontainers")
add_library(QuickQanava STATIC IMPORTED)
set_target_properties(QuickQanava PROPERTIES IMPORTED_LOCATION "/usr/local/lib/libQuickQanava.a")
add_library(QuickContainers STATIC IMPORTED)
set_target_properties(QuickContainers PROPERTIES IMPORTED_LOCATION "/usr/local/lib/libQuickContainers.a")

And then the example from the docs

import QtQuick 2.0
import QuickQanava 2.0 as Qan
//import "qrc:/QuickQanava" as Qan

Item {
    anchors.fill: parent
    //Image{
    //    anchors.fill: parent
    //    source: "./dummy_graph.png"
    //}
    Qan.Graph {
        id: graph
        anchors.fill: parent
        Component.onCompleted: {
            var n1 = graph.insertNode()
            n1.label = "Hello World"
        }
    }

}

but I get the following error (sample always the same cause):

)
qan::Graph::createFromComponent():  (qrc:/QuickQanava/VisualConnector.qml:30:1: module ":.QuickQanava" plugin "quickqanavaplugin" not found)
Component error:  (qrc:/QuickQanava/Node.qml:39:1: module ":.QuickQanava" plugin "quickqanavaplugin" not found)

If I understand #55 correctly I need to deploy as a plugin and do dynamic linking? Is there anywhere I can look to figure out how to do it?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions