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

Applications without QML [duplicate]

asked 2016-03-15 17:48:50 +0200

Garbaz gravatar image

As I stated in the Title, I'd like to know whether there is a way to program applications for Sailfish OS without having to cope with QML and if possible whether there is any documentation on that.

Thanks in advance to anybody who got information on that topic.


Before someone tries to convince me to "just use QML":

I won't.

Why? Because, to me, most highlevel languages are very unintuitive, no matter how well they are designed and I refuse to learn some new language or version of a language for every damn Platform/Purpose/... . Plus it always feels like such a waste of performance (even if it doesn't really matter in most cases).

edit retag flag offensive reopen delete

The question has been closed for the following reason "duplicate question" by jollailija
close date 2016-03-18 07:21:05.162053



Well. What would you like to use instead? This is a very open ended question really.

r0kk3rz ( 2016-03-15 17:51:37 +0200 )edit

C++. I thought that would be obvious, since its what QT is working with. And since Sailfish OS is built around QT, there doesn't seem to be much choice.

Garbaz ( 2016-03-15 18:16:54 +0200 )edit

There isn't any choice really. So you want to create a QtQuick UI using C++? or do you want to use QtWidgets?

Technically you can create a QtQuick app using nothing but C++, since that is what the declarative engine does behind the scenes anyway, but good luck finding good resources on how to do that.

Whether you like it or not, QML is the prescribed method of creating touch friendly QtQuick apps, and if you don't like it then I suggest you talk to the Qt Project about it.

r0kk3rz ( 2016-03-15 18:26:30 +0200 )edit

The QML part is (theoretically at least) only a description of the view. The core of the app is (almost always) in C++. If you don't want your view to be described in QML, don't, but then you'll not have all the visual integration that a QML view would have.

Tofe ( 2016-03-15 18:28:20 +0200 )edit

Also, QML isn't really much of a language as such, the syntax is fairly light on and for everything more complicated it uses Javascript anyway. Its mostly learning the framework rather than the language, which you might have to learn anyway depending on your Qt experience

r0kk3rz ( 2016-03-15 18:30:37 +0200 )edit

4 Answers

Sort by » oldest newest most voted

answered 2016-03-15 18:47:25 +0200

coderus gravatar image

Just dont buy a phone based on QML stack you dont want/refuse to learn. Live easy.

edit flag offensive delete publish link more



Android's XML/Java based apps are even worse. And sadly there aren't many choices regarding mobile operating systems.

Garbaz ( 2016-03-15 21:28:50 +0200 )edit

So, @coderus, is the answer yes or no?

pichlo ( 2016-03-15 21:49:16 +0200 )edit

answered 2016-03-15 19:54:59 +0200

updated 2016-03-15 19:58:33 +0200

Well, since you can read the QML files of most of the Silica QML elements, you could technically recreate them with plain C++. That will be a lot of work (we are talking about hundreads of hours) and may have a lot of licence issues, but sure, that's doable. (Almost) anything is doable with enough time and C++ code.

Edit: here's a GitHub repo with most the Silica QML files:

edit flag offensive delete publish link more



Nobody wants to rewrite the OS. The OP's question was quite clear, is it possible to use the OS without QML? I would like to know that too.

pichlo ( 2016-03-15 21:51:14 +0200 )edit

@pichlo, yes you can.

michfu ( 2016-03-15 22:20:25 +0200 )edit

@pichlo Isn't it quite clear? Yes, you can "use the OS without QML", but you need to rewrite all of the UI elements (just UI, not the whole OS), because they are all made with QML. That's the only way.

jollailija ( 2016-03-16 07:48:03 +0200 )edit

I guess QuasarMX is coded in plain Qt using just C++.

velemas ( 2016-03-16 12:39:32 +0200 )edit

@velemas I don't know about that, but at least it is not using the Sailfish Silica compotents.

jollailija ( 2016-03-16 15:13:13 +0200 )edit

answered 2016-03-16 14:00:49 +0200

MartinK gravatar image

One option could be SDL. The only problem is that SDL is broken and Jolla totally ignores all requests to fix it...

edit flag offensive delete publish link more


I'm curious, is SDL still broken or has it been resolved with 2.0?

ArmsOfSorrow ( 2016-03-27 19:31:54 +0200 )edit

answered 2016-03-18 07:20:45 +0200

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

updated 2016-03-18 07:20:45 +0200

Duplicate: https://together.jolla.com/question/78324/questionpure-c-sailfish-documentation/

edit flag offensive delete publish link more

Question tools



Asked: 2016-03-15 17:48:50 +0200

Seen: 1,183 times

Last updated: Mar 18 '16