caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] lablqt = OCaml + qt
@ 2011-09-22  9:57 Kakadu
  2011-11-24 14:04 ` [Caml-list] " Kakadu
  0 siblings, 1 reply; 3+ messages in thread
From: Kakadu @ 2011-09-22  9:57 UTC (permalink / raw)
  To: caml-list

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

Hello!

I'm working on Qt bindings for OCaml. You can browse my code at
https://github.com/Kakadu/lablqt

Now qtjambi parses Qt's header files and generates an XML representation of
API. Then binding generator generates OCaml and C++ code of bindings.

Now a big part of Qt's API is stored in aaa.xml, so you don't need to
install qtjambi's generator. Big part of QtCore и QtGui is incapsulated in
this xml file.

You can use build.ml script to compile lablqt. Btw, lablqt depends on
janestreet's core_extended library.

You can see test examples in test_gen/test* directories. For examle:
https://github.com/Kakadu/lablqt/blob/master/test_gen/test5/main.ml

I've implemented almost type-safe connections from signals to slots. Also
I've created tool <https://github.com/Kakadu/lablqt/tree/master/moc>to
simplify creating of user-defined slots: you can connect them like
here<https://github.com/Kakadu/lablqt/blob/master/test_gen/test4/main.ml#L27>
and write your code separately
<https://github.com/Kakadu/lablqt/blob/master/test_gen/test4/UserSlots.ml#L2>
.

Lablqt is compilable only on a few number of machines, so I'll be glad if
you test it on your computer.

It's difficult to me to decide in what direction Qt bindings should be
developed. I you have any ideas or recommendations, I'll be glad to read
them.

Best wishes,
Kakadu

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Caml-list] Re: lablqt = OCaml + qt
  2011-09-22  9:57 [Caml-list] lablqt = OCaml + qt Kakadu
@ 2011-11-24 14:04 ` Kakadu
  2011-11-24 14:50   ` Jérémie Dimino
  0 siblings, 1 reply; 3+ messages in thread
From: Kakadu @ 2011-11-24 14:04 UTC (permalink / raw)
  To: caml-list

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

Hello

Bad news: it seems that lablqt is in decadance. I'm still planning to
implement inheritance (described
here<https://github.com/Kakadu/lablqt/wiki/Inheritance>),
but there are some problems with proof-of-concept
app<https://github.com/Kakadu/lablqt/tree/master/inher>.
It shows a widget and after pressing any key it crashes while calling
caml_send0 function (autogenerated function for calling methods of ocaml
objects. see ocaml sources)

I will be glad if you will discuss this way of implementing inheritance, or
give me a tip about crash.

Best wishes,
Kakadu

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Caml-list] Re: lablqt = OCaml + qt
  2011-11-24 14:04 ` [Caml-list] " Kakadu
@ 2011-11-24 14:50   ` Jérémie Dimino
  0 siblings, 0 replies; 3+ messages in thread
From: Jérémie Dimino @ 2011-11-24 14:50 UTC (permalink / raw)
  To: Kakadu; +Cc: caml-list

Hi,

Le jeudi 24 novembre 2011 à 18:04 +0400, Kakadu a écrit :
> Bad news: it seems that lablqt is in decadance. I'm still planning to
> implement inheritance (described here), but there are some problems
> with proof-of-concept app. It shows a widget and after pressing any
> key it crashes while calling caml_send0 function (autogenerated
> function for calling methods of ocaml objects. see ocaml sources)

In classes.ml, lines 23, you expect x0 to be an OCaml object (of type
qKeyEvent), but in AA.cpp, line 28, you call the keyPressEvent method
with argument _ev which is just a value of type "[`qobject] obj" and not
an OCaml object. This is why it crashes.

-- 
Jérémie



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-24 14:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-22  9:57 [Caml-list] lablqt = OCaml + qt Kakadu
2011-11-24 14:04 ` [Caml-list] " Kakadu
2011-11-24 14:50   ` Jérémie Dimino

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