Qt for Elixir


Cure seems to be a solution to get a user interface library working in Elixir.

To be precise, Qt is even more as that:

There is a full fledged web engine called V4, which is the Qt port of V8.

Then some things which are already there in Elixir, so probably zero use for them: SQL support and container classes, as well as some other networking libraries.

The highlight for me is QML, a declarative language in the style of JSON, with that one we can design user interfaces with ease, fully rendered on the GPU and both, desktop and mobile friendly.

Also, animations are done easily.

It scales automatically with the screen size, use the native control element design of the specific platform (all majors are supported) https://en.wikipedia.org/wiki/QML

And there is even a JavaScript library, which converts that stuff into web languages.

So, here is my issue: I have no clue about how to use this implementation called Cure, or Elixir at all. I am a programming newbie and like to use Qt in combination with a functional language.

I think in specific, that the approach here with Cure is something fundamental and that it takes probably a few more steps in order to implement it.

The question is now: How much?

Elixir for game development

Cure is a Port library, it has nothing whatsoever to do with QT other than that you can ‘call’ a QT program, like with any other Port library or the OTP-built-in Port handling. So I’m not sure why this is saying that it is a solution for QT handling when it is just Ports? You’d still have to write the QT program in another language.

Cure is just a Port library, nothing special there. You could just use normal Elixir ports.

The main goal would be to make QT calls straight from Elixir, but embedding QT into the BEAM would be…unsafe. A Port is a good way to go but multi-platform needs to be taken into account then. The Cure library is not special in any way for this though and you could just use the built-in Port calls as the extras Cure adds are not useful for these purposes.

You still have to write the entire QT mapping, a Port just calls an external program and communicates with it over stdin/stdout, that is all that it does. ^.^


Because i can import JS files in QML


Eh, unsure how that relates? It just compiles Elixir to Javascript.


Javascript is a first class citizen in Qt: http://doc.qt.io/qt-5/qtqml-javascript-imports.html

QML is enough to me, now. Qt support in form of JS import commands of the specific library’s are of course very welcome, same counts for KDE: https://github.com/elixirscript/elixirscript/issues/340


Yes, but calling QT from the BEAM is not, still need a port. :wink:


I dont need to call it from the Beam. I simply use the JS implementation. I like to code in Erlang, compile in JS/C++