All Projects → Kakadu → Lablqml

Kakadu / Lablqml

Interfacing Qt/QML with OCaml. Formely known as lablqt

Programming Languages

ocaml
1615 projects

Projects that are alternatives of or similar to Lablqml

React Nodegui Starter
Starter repository for react based native desktop apps using react-nodegui
Stars: ✭ 132 (-2.94%)
Mutual labels:  gui, qt
Examples
Learn to create a desktop app with Python and Qt
Stars: ✭ 1,196 (+779.41%)
Mutual labels:  gui, qt
Guitar
Git GUI Client
Stars: ✭ 1,136 (+735.29%)
Mutual labels:  gui, qt
Spix
UI test automation library for QtQuick/QML Apps
Stars: ✭ 48 (-64.71%)
Mutual labels:  qtquick, qt
Qtquickvcp
A Virtual Control Panel for Machinekit written in Qt/C++/QML
Stars: ✭ 104 (-23.53%)
Mutual labels:  qtquick, gui
Osgqtquick
Intergation OpenSceneGraph to Qt Quick
Stars: ✭ 53 (-61.03%)
Mutual labels:  qtquick, qt
Silx
silx toolkit
Stars: ✭ 69 (-49.26%)
Mutual labels:  gui, qt
Nodegui
A library for building cross-platform native desktop applications with Node.js and CSS 🚀. React NodeGui : https://react.nodegui.org and Vue NodeGui: https://vue.nodegui.org
Stars: ✭ 7,324 (+5285.29%)
Mutual labels:  gui, qt
Blender Toolbox Qt
Attempt to recreate a blender like toolbox in Qt
Stars: ✭ 98 (-27.94%)
Mutual labels:  gui, qt
Nodegui Starter
A starter repo for NodeGui projects
Stars: ✭ 93 (-31.62%)
Mutual labels:  gui, qt
Guiscrcpy
A full fledged GUI integration for the most award winning open-source android screen mirroring system -- scrcpy located on https://github.com/genymobile/scrcpy/ by @rom1v
Stars: ✭ 960 (+605.88%)
Mutual labels:  gui, qt
Autoannotationtool
A label tool aim to reduce semantic segmentation label time, rectangle and polygon annotation is supported
Stars: ✭ 113 (-16.91%)
Mutual labels:  qtquick, qt
Lqt
Lua Binding for Qt5
Stars: ✭ 30 (-77.94%)
Mutual labels:  gui, qt
Awesome Qt Qml
A curated list of awesome Qt and QML libraries, resources, projects, and shiny things.
Stars: ✭ 1,118 (+722.06%)
Mutual labels:  qtquick, qt
Qdirstat
QDirStat - Qt-based directory statistics (KDirStat without any KDE - from the original KDirStat author)
Stars: ✭ 912 (+570.59%)
Mutual labels:  gui, qt
Nitroshare Desktop
Network file transfer application for Windows, OS X, & Linux
Stars: ✭ 1,150 (+745.59%)
Mutual labels:  gui, qt
Scihubeva
A Cross Platform Sci-Hub GUI Application
Stars: ✭ 683 (+402.21%)
Mutual labels:  qtquick, qt
Slate
Pixel Art Editor
Stars: ✭ 723 (+431.62%)
Mutual labels:  qtquick, qt
Qode
Qode is a lightly modified fork of Node.js that merges Node's event loop with Qt's event loop. It is designed to be used together with @nodegui/nodegui.
Stars: ✭ 84 (-38.24%)
Mutual labels:  gui, qt
Qaterial
🧩 Collection of Material Components based on QtQuickControls2.
Stars: ✭ 110 (-19.12%)
Mutual labels:  qtquick, qt

OCaml 4.10 on master

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).

Installed files

$ opam show lablqml --list-files
/home/kakadu/.opam/4.07.0+fp+flambda/bin/ppx_qt
/home/kakadu/.opam/4.07.0+fp+flambda/doc/lablqml/CHANGELOG
/home/kakadu/.opam/4.07.0+fp+flambda/doc/lablqml/README.md
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/META
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/dune-package
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.a
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.cma
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.cmi
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.cmt
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.cmti
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.cmx
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.cmxa
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.cmxs
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.h
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.ml
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/lablqml.mli
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/liblablqml_stubs.a
/home/kakadu/.opam/4.07.0+fp+flambda/lib/lablqml/opam
/home/kakadu/.opam/4.07.0+fp+flambda/lib/stublibs/dlllablqml_stubs.so

There is a library here. It's fine to use it for simple programs

There is also ppx_qt executable. It is used to generate C++ code from OCaml. See demos/ for examples

Minimal ocamlfind-based helloworld

➜  cat a.ml
open Lablqml

let main () = ()
let () =
  run_with_QQmlApplicationEngine Sys.argv main "Root.qml"
➜  cat Root.qml
import QtQuick 2.0
import QtQuick.Controls 1.0

ApplicationWindow {
    color: "#FFFFDF" // we declare rectangle with custom background color
    width:  400;
    height: 300;     // with custom size
    Text {
        anchors.centerIn: parent
        text: "Click me!"
    }
    MouseArea {
        anchors.fill: parent      // all space in parent Rectangle will be clickable
    }
}
➜  ocamlfind opt -package lablqml a.ml -thread -linkpkg -cclib -lQt5Quick -cclib -lQt5Qml -cclib -lQt5Network -cclib -lQt5Widgets -cclib -lQt5Gui -cclib -lQt5Core -cclib -lstdc++
➜  ./a.out

Playing with REPL

#thread;;
#require "lablqml";;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].