December 9, 2010

Jayakrishnan.M Jayakrishnan..
Ant Farmer
194 posts

Qml and Qt gui controls

 

Hi,

I’am a Qt c++ programmer and I don’t know css. Nokia is now actively pushing Qt Quick for developing GUIs. I’am in a bit of confusion over what I should use to create GUIs for my c++ applications. Qml is declarative like css. So the target for Qml seems to be the web designers. If I develop a c++ application in Qt, how should I develop the GUI. I have now the option of using the GUI Designer, or I can develop custom controls subclassing QWidget. What is the recomended way of creating guis for Qt c++ applications. Is it, writing the GUIs in Qml and accessing it from c++ or using the Qt GUI components and Qt designer ?

One of the issues I face is none of our designers know Qml. Though similar to css, it is not css. The designers needs time to learn it. Being a c++ programmer I’am not familiar with the css stuff either. Is Qml really intended for web widget developers ? I think any effects possible with Qt quick should be doable in c++ with Qt gui and animation framework. So I don’t feel I need Qml for creating great looking gui applications. Or am I wrong ? Am I forced to learn Qml if I need to create a great UI experience ?

7 replies

December 9, 2010

Deleted Member # 4a2 Deleted Member # 4a2
Ant Farmer
1481 posts

Jayakrishnan, a lot of questions :)

Quick is something very good I’ve seen. The fluid UI experience is just amazing!

I’d first recommend you to spend some time and see the demos and examples already available in Qt SDK installation .. see some videos available on youtube, you will get a hang of its capabilities.

I went through the basic Quick tutorials (available in Qt Assistant) in under a day, you will find answers to most of your questions. Then probably you will have more specific questions for the forum :)

December 9, 2010

Bradley Bradley
Lab Rat
314 posts

There have been other similar discussions.

Jayakrishnan.M wrote:
What is the recomended way of creating guis for Qt c++ applications. Is it, writing the GUIs in Qml and accessing it from c++ or using the Qt GUI components and Qt designer ?

It depends upon the type of application. Because Qt Quick has a limited set of components (currently), most applications are better served by the QWidget components. However, when making an application with fully custom UI experience, Qt Quick provides powerful features and tremendous flexability.

Jayakrishnan.M wrote:
Is Qml really intended for web widget developers ?

No. QML is intended for designers, but it is very similar to JavaScript which is a familiar technology to most Web designers/developers.

Jayakrishnan.M wrote:
I think any effects possible with Qt quick should be doable in c++ with Qt gui and animation framework. So I don’t feel I need Qml for creating great looking gui applications. Or am I wrong ?

You are correct everything possible in QML is possible in C++ (and vice versa). However some things are much more easily implemented in one or the other.

Jayakrishnan.M wrote:
Am I forced to learn Qml if I need to create a great UI experience ?

Not at all.

 Signature 

Nokia Certified Qt Specialist.

December 9, 2010

Wolf P. Wolf P.
Ant Farmer
354 posts

I found the fexibility and the anchor-based layout concepts of qml very impressive, although I missed ready-to-use “classic” GUI elements like buttons.

Is there much extra-efford to use QML GUIs with traditional desktop applications?

December 9, 2010

Wolf P. Wolf P.
Ant Farmer
354 posts

…BTW: I added a tag all-purpose qml [developer.qt.nokia.com] for collecting QML vs. traditional questions…

December 9, 2010

Bradley Bradley
Lab Rat
314 posts
Wolf P. wrote:
Is there much extra-efford to use QML GUIs with traditional desktop applications?

I don’t think so, but there is a learning curve for the polygot programming and integrating C++ and QML.

Wolf P. wrote:
…BTW: I added a tag all-purpose qml [developer.qt.nokia.com] for collecting QML vs. traditional questions…

I don’t understand how “all-purpose” refers to QML vs widget-based UIs.

 Signature 

Nokia Certified Qt Specialist.

December 9, 2010

Jayakrishnan.M Jayakrishnan..
Ant Farmer
194 posts

Thanks Chetan and Bradley for the response. I will try to learn some Qml. I was less inclined to look into Qml since it is declarative and I don’t know either css or Javascript. The links posted was useful. Somehow I missed those discussions. I think the use case for Qml will be applications having relatively simpler UI and a fluid user experience. For more complex UIs with tables, tree views, split windows etc, c++ would be better.

December 9, 2010

Wolf P. Wolf P.
Ant Farmer
354 posts
Bradley wrote:
Wolf P. wrote:
…BTW: I added a tag all-purpose qml [developer.qt.nokia.com] for collecting QML vs. traditional questions…

I don’t understand how “all-purpose” refers to QML vs widget-based UIs.

I seached for a tag addressing the comparison between QML and “traditional” UI programming.
maybe qml vs widget-based would fit better, where “widget” means two ways:

  • using ui files
  • programming UI in C++

Maybe we start better a wiki article to collect informations about this complex decisions.

since we have not combined tag search, tags combining word are useful.
I’m no trying with “qml vs widget” :)

 
  ‹‹ [solved] Qt conflict with SDL on libpng?      What do you need from Qt and HTML5? ››

You must log in to post a reply. Not a member yet? Register here!