Interfacing Qt/QML with OCaml. Formely known as lablqt
Clone or download
Latest commit faeb351 Aug 22, 2018
Permalink
Failed to load latest commit information.
demos Garbage collection Aug 21, 2018
dune_test trying to fix build Jul 17, 2018
lib trying to fix build Jul 17, 2018
ppx trying to fix build Jul 17, 2018
.gitignore trying to fix build Jul 17, 2018
CHANGELOG update change log Aug 8, 2017
CONTRIBUTING.md Add contributing.md Aug 8, 2017
Makefile Garbage collection Aug 21, 2018
README.md Garbage collection Aug 21, 2018
configure Garbage collection Aug 21, 2018
dune Working on jbuilder Jul 17, 2018
dune-project Working on jbuilder Jul 17, 2018
opam Garbage collection Aug 21, 2018

README.md

Let's write QML/QtQuick GUI for OCaml (or Reason) using lablqml!

In this repo you can find my work about integrating OCaml and Qt. Initially, I planned to generate binding code for OCaml and Qt Widgets and called this library lablqt. But I found it hard to implement mostly because Qt relies on inheritance very much (we can't add onClick handler for button without inheritance). Later I decided to generate binding code for OCaml and QML/QtQuick. And I believe that QtQuick is the right way to create UI in Qt right now. See online book for getting started with Qt/QML itself

From 14th of February 2017 it's renamed from lablqt to lablqml because it is actually about QtQuick and not QtWidgets or Qt itself. If you really need QtWidgets you can check out mrvn's work or def's.

Directories mapping:

  • PPX syntax extension with code generator is in ppx/.
  • Library for interfacing with QtQuick 2 is in lib.
  • Demo that can be build during opam installation is in dune_test. Use make demo to build it.
  • Old demos that are not using dune as build system are in demos/.
  • Demo app qocamlbrowser (ocamlbrowser with QtQuick instead of Tcl/Tk) is located in separate repo.

Github pages site and tutorial are available.

Use ./configure && make to build it. Don't forget to install g++ and good Qt version (>= 5.3 I think, ./configure will check for it, btw).