QML.jl icon indicating copy to clipboard operation
QML.jl copied to clipboard

JuliaVariantMap/QVariantMap to expose complex objects.

Open green-nsk opened this issue 4 years ago • 0 comments

When exposing context properties via JuliaPropertyMap I find it a little limiting that there's basically only one level of indirection available. I.e. you can't make complex Julia objects to be available inside JuliaPropertyMap, only simple types like int/string/array(of simple types).

Looking at how JuliaPropertyMap/QQmlPropertyMap is implemented, it doesn't seem hard to build a component with behaviour similar to QVariantMap that we can allocate in Julia and expose to Qt world. I thought I ask here before trying to give it a go as I'm not very familiar with QML.jl inner workings.

If that component is made available we can basically expose an arbitrary Julia object to QML (with obvious limitations in performance and need for allocations, but yet).

Please let me know if that sounds reasonable, and I might give it a go.

green-nsk avatar Mar 01 '21 12:03 green-nsk