Live data from Hacker News

Digia releases Qt 5.2 with Android and iOS support

thenextweb.com

41–50 of 53 posts

Re: Digia releases Qt 5.2 with Android and iOS support

#41

Earlier quoted context omitted.

> have to distribute source or .o files for your application Not if you dynamically link

Do iOS guidelines allow dynamic linking?

AFAIK it's not allowed, so Qt commercial is actually the only option for non-OSS on iOS.

Re: Digia releases Qt 5.2 with Android and iOS support

#42
post #27

Anyone have a good link (video? blog entry?) discussing what problem QML solves and why it is better than other solutions? Within the docs the biggest thing I am able to find is the following hand wavy statement: "QML is a user interface specification and programming language. It allows developers and designers alike to create highly performant, fluidly animated and visually appealing applications. QML offers a highl…

For one thing it has a much better box model than CSS/HTML, layouts are much nicer. It allows you to have a scripted UI in C++ apps, but there is no reason someone couldn't write a codegen to spit out HTML/CSS. There is already one called qmlweb but not sure if its maintained.

It also has bits of reactive programming so that value changes in variables propagate to uses of that variable, making it really easy to have fluid layouts, or to recalculate labels or similar. I like to think of it as a better presentation layer than HTML/CSS. I made a game 2 years ago using QML + JS [1]

[1] https://github.com/nikhilm/solarwolf-qml

Re: Digia releases Qt 5.2 with Android and iOS support

#43
post #27

Anyone have a good link (video? blog entry?) discussing what problem QML solves and why it is better than other solutions? Within the docs the biggest thing I am able to find is the following hand wavy statement: "QML is a user interface specification and programming language. It allows developers and designers alike to create highly performant, fluidly animated and visually appealing applications. QML offers a highl…

I've used QML / QtQuick for a while. Here are my thoughts

1. It makes writing UI state machines much simpler since it is declarative. Instead of saying "when this information changes, update the UI", you just say "This bit of UI shows this information" and then it updates it does it automatically.

2. Animation is also much easier (and possible at all).

3. Layout is... myeh it is not so good actually. UI files made it really really simple, but QML has a kind of Android-like overcomplication to it. For example I have no idea how to have two buttons above each other with the same width and have that width the minimum required to fit them both. With the old system I didn't even have to think about that.

4. Javascript was a seriously bad choice. Fortunately you don't write that much of it (and the non-javascript parts of QML are well designed). The biggest problem is that you have to run code to have even the vaguest idea that it will work (probably you misspelt a variable). With C++ if it compiles you at least have some idea that it will work. Also there is a lot of hassle converting between C++ values and javascript objects. Particularly for lists/vectors of things which work very badly and... to be honest does not really work.

5. It does force you to separate your logic and UI - kind of like HTML/CSS. This is a good thing generally.

6. Once you've done the hard C++ work, building the UI is much quicker and less verbose than using the old system. It is also easier to change around.

In generally they are going in the right direction. They just made a huge mistake by choosing javascript. They've ended up writing their own javascript VM too, so I don't know why they didn't take the opportunity to use a sane, strongly typed language.

Re: Digia releases Qt 5.2 with Android and iOS support

#44
post #27

Anyone have a good link (video? blog entry?) discussing what problem QML solves and why it is better than other solutions? Within the docs the biggest thing I am able to find is the following hand wavy statement: "QML is a user interface specification and programming language. It allows developers and designers alike to create highly performant, fluidly animated and visually appealing applications. QML offers a highl…

QML was the natural extension of where Qt was evolving to. With listviews in itemviews-ng having delegates that were just a set of graphics-view objects, QML took it one step further by defining it in QML.

The effect is really an amazingly well working separation of concerns. The biggest and simplest reason is that when you can wrap your head around QML, it takes no time at all to write a good UI.

So, the goal changes from having a complicated UI that has to work well on 5 different form-factors to instead have up to 5 different UI layers to work best on those form-factors. You really can write a good looking UI in a fraction of the time compared to a QWidget approach.

Most of QML is based on core Qt/QObject concepts. A binding is just a combination of a signal, getter and maybe setter. Just to state again that this is just a extension of the direction Qt had been going in for some time already.

See for a simple overview; http://www.youtube.com/watch?v=_6_F6Kpjd-Q

ps. I didn't "get" it until I took part in a kdab course. Its really not that trivial to wrap your head around ;)

Re: Digia releases Qt 5.2 with Android and iOS support

#45
post #27

Anyone have a good link (video? blog entry?) discussing what problem QML solves and why it is better than other solutions? Within the docs the biggest thing I am able to find is the following hand wavy statement: "QML is a user interface specification and programming language. It allows developers and designers alike to create highly performant, fluidly animated and visually appealing applications. QML offers a highl…

I've used QML / QtQuick for a while. Here are my thoughts 1. It makes writing UI state machines much simpler since it is declarative. Instead of saying "when this information changes, update the UI", you just say "This bit of UI shows this information" and then it updates it does it automatically. 2. Animation is also much easier (and possible at all). 3. Layout is... myeh it is not so good actually. UI files made it…

The history of the VMs is that many years before there was QML there was QtScript. A Javascript based engine. This got used for Qt4. In Qt5 the V8 open source engine got used instead.

Either way, they ended up picking something that was already there, which would explain why it was easier than creating a brand new langauge.

Re: Digia releases Qt 5.2 with Android and iOS support

#47
post #10
post #2

Does this mean we can create Android and iOS apps with Python (via e.g. PyQt)?

Actually QML apps can be written only using QML + Javascript. Performance or platform dependent parts can be written in C++. Some Qt based frameworks experience. Ubuntu Touch chose to develop apps using Javascript only where possible. BlackBerry apps support both Javascript and C++. There are people who believe that QML must be used only for UI and all logic must be written in C++. IMHO Javascript is good choice as i…

Javascript in iOS is not a good idea, unless you are just prototyping/building a basic app.

Re: Digia releases Qt 5.2 with Android and iOS support

#49
post #27

Anyone have a good link (video? blog entry?) discussing what problem QML solves and why it is better than other solutions? Within the docs the biggest thing I am able to find is the following hand wavy statement: "QML is a user interface specification and programming language. It allows developers and designers alike to create highly performant, fluidly animated and visually appealing applications. QML offers a highl…

I've used QML / QtQuick for a while. Here are my thoughts 1. It makes writing UI state machines much simpler since it is declarative. Instead of saying "when this information changes, update the UI", you just say "This bit of UI shows this information" and then it updates it does it automatically. 2. Animation is also much easier (and possible at all). 3. Layout is... myeh it is not so good actually. UI files made it…

Is using Javascript mandatory (for common uses)?

Re: Digia releases Qt 5.2 with Android and iOS support

#50

If I have a desktop app written using Qt libraries directly (i.e. no QML, .ui files, etc) will this new version allow it to run on iOS and Android?

I have no idea about iOS, but I have tried porting some QWidget based apps on Android using 5.1 (not tried 5.2 yet), and they did work but poorly. Some widgets looked downright ugly and some had layout issues.

I ended up rewriting my UI in QML instead and that worked very well.

Post reply on HN