- Qt > 5.12 is mandatory for Qt Quick Shapes support.
- Google Test is optional only to build and run tests .
Get the latest QuickQanava sources:
git clone https://github.com/cneben/QuickQanava
cd QuickQanava
Or install as a Git submodule:
$ git submodule add https://github.com/cneben/QuickQanava
$ git submodule update
QuickQanava could be used with either qmake or CMake build configuration system.
qmake (Qt5) | CMake (Qt6) |
---|---|
Static build, no QML module, all resources are linked statically trough QRC | Installable or embedable, QuickQanava is loaded using a QML module that need to be installed, resources can be linked statically trough QRC |
Using qmake (preferred and supported way of integrating QuickQanava):
-
Open quickqanava.pro in QtCreator.
-
Select a kit, build and launch samples.
or with (CMake >= 3.5) and Qt Creator:
-
Open CMakeLists.txt in QtCreator.
-
In 'Projects' panel, set DQUICK_QANAVA_BUILD_SAMPLES option to true in CMake configuration panel.
-
Select a kit, build and launch samples.
Or manually in command line using CMake:
$ cd QuickQanava
$ mkdir build
$ cd build
# IF QT_DIR IS CONFIGURED AND QMAKE IN PATH
$ cmake -DCMAKE_BUILD_TYPE=Release -DQUICK_QANAVA_BUILD_SAMPLES=TRUE -DBUILD_STATIC_QRC=TRUE ..
# IF QT DIR IS NOT CONFIGURED, CONFIGURE KIT MANUALLY
$ cmake -DCMAKE_PREFIX_PATH="/home/b/Qt/5.11.0/gcc_64" -DQT_QMAKE_EXECUTABLE="/home/b/Qt/5.11.0/gcc_64/bin/qmake" -DQUICK_QANAVA_BUILD_SAMPLES=TRUE -DBUILD_STATIC_QRC=TRUE ../QuickQanava/
$ cmake --build .
# Then run the samples in ./samples
# Eventually make install
Detailed instructions: Installation
Note that a previously installed "QML plugin" version of QuickQanava might interfere with a fully static build using direct .pri inclusion. Typical error message looks like:
QQmlApplicationEngine failed to load component
qrc:/nodes.qml:33 module "QuickQanava" plugin "quickqanavaplugin" not found
QuickQanava and QuickContainers plugins directories could be removed manually from $QTDIR\..\qml
to fix the problem (ex: rm -rf '~/Qt/5.11.1/gcc_64/qml/QuickQanava').
On Ubuntu system, the following dependencies must be isntalled:
$ sudo apt install libopengl0 -y