← Back to team overview

ubuntu-phone team mailing list archive

Re: Is there going to be a standard QML UI toolkit?

 

Things like Rows, Item and other QtQuick Components will be the same.
Ubuntu Touch will have support for the whole Qt5 and in the future Qt5.1
components. (I don't know about the Qt Mobility stuff tho) The problem is
that most platforms still use Qt4.8 which is not supported by Ubuntu Touch
because it relies on X, although a lot of things will stay the same.
When these (like Sailfish OS) will support Qt5, then there is the problem
of the UI components. Every OS has different components atop of Qt. The
ones for Ubuntu are here:
http://developer.ubuntu.com/api/devel/ubuntu-13.10/qml/ui-toolkit/overview-ubuntu-sdk.html

Also the communication with the OS is different (File acces etc)

You could design your js file to not care about things, the way I mailed
before. For instance the Toolbar in Ubuntu Touch could execute the same js
function as some button on the Jollo app. And because it's a declarative
language, you don't have to compile a thing and you can even choose at run
time which QML file to load.


2013/7/30 Andreas Poulsen <ubuntufon@xxxxxxxxx>

> I see, but will Ubuntu Phone at least have support for QtQuick.Components?
> That seems to be a good way to write portable apps, if you don't need
> the platform specific components like Toolbar.
>
> Regards
> Andreas
>
> On 29-07-2013 16:49, Michael Zanetti wrote:
> > Hi
> >
> > On Monday 29 July 2013 15:53:52 Andreas Poulsen wrote:
> >> I just wondered, if there is any plan to have a more general QML UI
> >> toolkit. For now, there is Ubuntu.Components, Sailfish OS has some
> >> components, and QtQuick is going to have some QtQuick.components. Could
> >> you guys talk together about some standard components? It would be much
> >> more easy, to develop one app for 2 or 3 platforms, than creating it for
> >> 3 platforms using the same technology, but different toolkits. Just a
> >> wish from an app developer :)
> > Yes, this is really one of the bad things of the current state with QML
> in
> > general.
> >
> > There are talks in progress to align APIs as close as possible. However,
> I
> > think it won't be possible (at least not in the foreseeable future) to
> have
> > the same components everywhere. The reason is that different platform
> look and
> > behave differently. Even if most of the components could probably
> aligned,
> > there will always be differences for some of them. For example if a
> platform
> > doesn't have some UI pattern or a platform invents a new one. One
> example is
> > the hiding Toolbar on Ubuntu. MeeGo's toolbar didn't do that so there is
> the
> > need of a difference in the API.
> >
> > Also a different look of the same UI patterns introduces problems here.
> For
> > example if one platform uses big round buttons with spaces in between
> while
> > another one uses small square buttons without a space. That would allow
> you to
> > place a different amount of items into one row. While the API might be
> > compatible, your application would look quite bad one one of the
> platforms.
> >
> > The original idea for QML was to write the common stuff in Qt/C++ and
> then
> > create a very thin UI layer with QML on top of it. That thin UI layer is
> easy
> > and fast to write (just puttin some Buttons and Images into a layout and
> hook
> > functionality up to the C++ business logic which is really cross
> platform).
> > This works quite well for me having a bunch of apps running on Maemo,
> MeeGo,
> > Symbian, KDE and Ubuntu Touch.
> >
> > Of course, if you write an app only in QML and smash your javaScript
> somewhere
> > between the painting code, your app's portability will go towards 0. You
> can
> > of course stick to JavaScript for the platform independent code too, but
> make
> > sure to have JavaScript in separate files, and with a clean API, never
> > accessing properties/elements from the QML code from within JavaScript.
> Then I
> > guess you can create something somewhat portable without C++ too.
> >
> > Br,
> > Michael
> >
>
> --
> Mailing list: https://launchpad.net/~ubuntu-phone
> Post to     : ubuntu-phone@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntu-phone
> More help   : https://help.launchpad.net/ListHelp
>

Follow ups

References