Hi Uwe, See below for inline answers. As a general note, I mostly started the QML module as a proof-of-concept and a real-world test for CppWraper (soon CxxWrap.jl). I'm having a lot of fun with it at the moment, but I can't promise I'll be able to turn this into a feature-complete GUI toolkit. For now it supports julia callbacks in QML, context properties that can be set from Julia and QTimer support for background tasks.
On Friday, March 25, 2016 at 6:07:44 PM UTC+1, Uwe Fechner wrote: > 1. When shall I use Julia strings, when a QByteArray? > QByteArray is only used in set_data, to set QML code directly from Julia, as in https://github.com/barche/QML.jl/blob/master/test/qqmlcomponent.jl For QUrl and QString, the conversion to and from Julia strings is implicit. I chose not to do this for QByteArray because it can contain binary data. > > 2. Are some or all methods of QT classes, e.g. of QByteArray exposed to > Julia? > If only a subset of the methods is exposed, how was it choosen? > QByteArray only has a constructor exposed, here: https://github.com/barche/QML.jl/blob/master/deps/src/qml_wrapper/wrap_qml.cpp#L326 Methods are chosen based on the functionality that is needed. > As far as I can see, the following QT classes are currently > wrapped: > How is the ownership of objects of these classes handled? Are they > carbage collected by the Julia garbage collector? > Any object created using the Julia constructor gets a finalizer that calls delete on the C++ object, so they are collected. When a function returns an existing object that is managed by Qt (e.g. root_context) such a finalizer is not created because Qt will delete it on its own when needed. > > 3. I can see the type JuliaSlot. How is the signal-slot communication > implemented? > Is it using a message queue? If yes, is the the QT message queue? > This was mostly for working with QTimer. The connect_timeout function takes a QTimer and a JuliaSlot to do a normal Qt signal-slot connection. For the time being I don't see an easy way to generalize this. It's probably easier to set connections like this on the QML side. Cheers, Bart
