Kakadu edited this page May 10, 2013 · 10 revisions


I have met many problems with implementing inheritance in QtGui bindings. Also QtGui has legacy status in Qt >= 5.0. So I decided to try myself in QtQuick.

Proof of concept

I've made attempt to rewrite ocamlbrowser using Qt and QtQuick. Cooperation between OCaml and C++ will be gained buy C++ classes generated by moc tool. Now I'm studying QtQuick and trying to create flex interface and generator. Help of QtQuick hackers will be appreciated.

Current state (on 10th of May 2013)

Latest source files are located in qml-dev branch. Directory tree:

  • src/ --- sources for codegenerator for QtQuick. Use ocamlbuild mocml.native to get it
  • qml/ --- root folder for QtQuick-related things
  • qml/lib --- helper library for interfacing OCaml code and QtQuick (use it to expose OCaml objects to QtQuick runtime)
  • qml/test --- ocamlbrowser-like application created using this approach
  • qml/halloworld --- very simple Hallo World application with OCaml and QtQuick 2.0. Its description you can find at wiki page.

QtGui-related articles


  1. Why generator depends on JaneStreet's core and core_extended?

    Ermine says that she has never seen any useful library that depends on js's core. :-) Also I want to receive experience of using this library and report it maybe in #ocaml@conference.jabber.ru.