libqmlbind
A C library for creating QML bindings for other languages easily through exporting objects to QML
libqmlbind

libqmlbind is a C library for creating QML bindings for other languages easily through exporting objects and classes to QML.

Features

Code Structure

Mapping of Classes to the C interface

Ownership Conventions used in libqmlbind:

How to install

Mac + Homebrew

You can install libqmlbind via Homebrew on Mac. (using a custom tap)

1 > brew tap seanchas116/libqmlbind
2 > brew install libqmlbind

Arch Linux via AUR

For Arch Linux, you can find the latest release and the git master version of libqmlbind in the AUR.

How to build

Requirements

Build the Code

First, clone the repository with all its submodules:

1 > git clone --recursive git@github.com:seanchas116/libqmlbind.git

Alternatively, if you already cloned but forgot --recursive, use this inside libqmlbind:

1 > git submodule update --init --recursive

Use qmake to generate the Makefile:

1 # if you want to use your default compiler:
2 > qmake -r
3 # if you want to use clang:
4 > qmake -r QMAKE_CC=clang QMAKE_CXX=clang

and then build it:

1 > make

Run the Tests

From the main directory:

1 > cd test
2 > ./test -platform offscreen

Build the Documentation

Just run

1 > doxygen

from the project's main directory. You can then find the documentation in doc/html/index.html.

Alternatives

If you're not happy with libqmlbind's interface or features, you might be interested in DOtherSide, an alternative C library for creating QML bindings. While libqmlbind was designed with dynamic languages like ruby in mind, DOtherSide was designed for static languages like D. (You can use libqmlbind for static languages, too, though, you just won't need some parts of the API).