We have moved to a new Sailfish OS Forum. Please start new discussions there.
1

Development using other frameworks + QML

asked 2017-07-07 16:21:14 +0300

adamski gravatar image

I am interesting in porting an app written using the JUCE C++ framework to Sailfish. Are there any examples out there of people using different frameworks/languages to build Sailfish apps, and how they solved the issue of calling Qt/QML based native UI methods?

I think for Sailfish to be as accessible and future proof as possible, this would be important - e.g, building a Sailfish app using Rust.

edit retag flag offensive close delete

Comments

2 Answers

Sort by » oldest newest most voted
1

answered 2017-07-22 12:23:03 +0300

Corvinux gravatar image

updated 2017-07-22 12:24:02 +0300

@adamski: Check out this "A simple Rust GUI with QML" on this site: https://www.vandenoever.info/blog/2017/02/17/a-simple-rust-gui-with-qml.html Corvinux

edit flag offensive delete publish link more
0

answered 2017-07-07 20:38:50 +0300

tortoisedoc gravatar image

updated 2017-07-07 20:56:15 +0300

It's quite "simple" (if you pass me the word), really.

SailfishOS runs on wayland, which means the (wayland) client (read : application) is responsible for rendering into a buffer provided by the Compositor itself.

I'd say (and these are my 2 cents), if the language you want to write the app in does support OpenGL, use that. It should be enough; of course you will need to manage input as well, so as long as you can hook on the /dev/input/?? devices you should be fine (assuming the language might even provide APIs for that). If the language does not have support for OpenGL, you need to write a wayland client for it (qt5-wayland I believe is the module used by QT and a good example to start with).

edit flag offensive delete publish link more

Comments

OK, sure, I can draw onto an OpenGL context, but what about "native" UI elements provided by SailfishOS? I think its important to preserve the "look and feel" of the platform.

adamski ( 2017-07-08 00:07:17 +0300 )edit

You'd need bindings into QML from your language; IIRC the stack would then be : QT -> QML -> #your_fav_language_here#

EDIT : i guess another option would be to only bind into the style objects of the qt/qml stack.

tortoisedoc ( 2017-07-08 09:28:37 +0300 )edit

Thanks - are there any examples of such bindings anywhere?

adamski ( 2017-07-08 18:56:54 +0300 )edit

@adamski : google is your friend, but IIRC gtk and pascal should have qml bindings..

tortoisedoc ( 2017-07-10 20:09:22 +0300 )edit
Login/Signup to Answer

Question tools

Follow
2 followers

Stats

Asked: 2017-07-07 16:21:14 +0300

Seen: 705 times

Last updated: Jul 22 '17