caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Vsevolod Velichko <torkvema@gmail.com>
To: Kakadu <kakadu.hafanana@gmail.com>
Cc: Paolo Donadeo <p.donadeo@gmail.com>,
	OCaml mailing list <caml-list@inria.fr>
Subject: Re: [Caml-list] [ANN] Lablqt
Date: Mon, 30 Dec 2013 12:43:18 +0400	[thread overview]
Message-ID: <CAAtb-VSKB-VTcAokGvkNaExe0B_5SrOSgGL9+zXqBp1eAvvmLg@mail.gmail.com> (raw)
In-Reply-To: <CAGmVoG0P32u2e0sJnLm6R9xW4=Nkb=RzX64Ck3ex+js8TQk=zA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 3837 bytes --]

Hello,

As I was the beta-tester of the lablqml, I can share some of my experience
:)

I've written an example[1] that creates a couple of views on top of
OCaml-created data models, emits signals from OCaml, calls OCaml callbacks
from QML and so on. It can be taken into account as some proof of concept.

At first, as Dmitry said there's some simple hardcoded startup, but it was
added on behalf of my request (I wanted one to be able to use GUI without
writing any line of C++ code). However one can still put their own startup
in C++.

Second, the developer still must deal with C++ compilation and linking
OCaml object files with C++ ones. AFAIK, Dmitry intends to improve the
process in some future, but currently it a bit tricky. I haven't tried
native OCaml build systems (such as ocamlbuild or omake) with it yet, but
using the Makefile one can see, that they have to manually resolve all the
Qt libraries to link with.

Third, there're still some issues. E.g. creating the data item object used
in view, I was unable to create a mutable property that can be used on top
level of delegate[2] so I had to expose[3] the object itself and access its
property, otherwise property changes weren't revealed to QML.

But anyway while lablqt is still to be considered as some beta release, I
claim that it is already more usable than e.g. lablgtk.

[1] https://github.com/torkve/melange-seawar
[2] https://github.com/torkve/melange-seawar/blob/master/gui.qml#L85
[3] https://github.com/torkve/melange-seawar/blob/master/gui.ml#L43

Best wishes and have a nice day,
Vsevolod Velichko


2013/12/19 Kakadu <kakadu.hafanana@gmail.com>

> Paolo,
>
> At the moment I have tested main use case of C++ in QtQuick:
> implementing business logic which expected to work fast.
>
> I can name three limitations:
>
> 1) If you need complex GUI control (that doesn't suit well into
> QtQuick paradigm) you will probably need to implement it in C++ by
> subclassing QQuickItem. The only example of this I have seen is pie
> chart using QPainter from Qt Docs.
> Reason: I don't clearly understand when this complex controls are
> needed. QML itself is rather powerful one.
>
> 2) At this moment startup process is a little bit hardcoded in one C++
> function. i.e. some features are unavailable. It was made for
> simplicity but I don't see any theoretical reason against rewriting it
> in more verbose way in 1 weekend.
>
> 3) I have working demo with main GUI thread and some OCaml threads
> that do some work and report changes in main thread. It seems that it
> works OK but I'm not sure what will happen if we construct more
> interesting examples.
>
> Kind regards,
> Kakadu
>
>
> On Thu, Dec 19, 2013 at 7:53 AM, Paolo Donadeo <p.donadeo@gmail.com>
> wrote:
> > At present, what are the limitation in using OCaml/QT compared to using
> > C++/QT?
> >
> >
> > --
> > Paolo Donadeo, sent with Gmail on Android
> >
> > Il 15/dic/2013 22:12 "Kakadu" <kakadu.hafanana@gmail.com> ha scritto:
> >>
> >> Salut,
> >>
> >> From today lablqt is available in opam. With it you can create user
> >> interfaces in declarative manner in QML and connect it with OCaml
> >> using `mocml` code generator and `lablqml` ocamlfind package. Qt 5.2
> >> is required for compilation
> >>
> >> More information you can get at [1]. There is mine opam repo where
> >> demo application is included. It is called QOCamlBrowser --
> >> application similar to default ocamlbrowser.
> >>
> >> All comments will be appreciated.
> >>
> >> Kind regards,
> >> Dmitrii Kosarev aka Kakadu
> >>
> >> [1] http://kakadu.github.io/lablqt
> >>
> >> --
> >> Caml-list mailing list.  Subscription management and archives:
> >> https://sympa.inria.fr/sympa/arc/caml-list
> >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> >> Bug reports: http://caml.inria.fr/bin/caml-bugs
>

[-- Attachment #2: Type: text/html, Size: 5393 bytes --]

      parent reply	other threads:[~2013-12-30  8:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-15 21:10 Kakadu
2013-12-19  7:53 ` Paolo Donadeo
2013-12-19 12:27   ` Kakadu
2013-12-19 16:22     ` Paolo Donadeo
2013-12-30  8:43     ` Vsevolod Velichko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAAtb-VSKB-VTcAokGvkNaExe0B_5SrOSgGL9+zXqBp1eAvvmLg@mail.gmail.com \
    --to=torkvema@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=kakadu.hafanana@gmail.com \
    --cc=p.donadeo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).