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 ?
-
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 :)
-
There have been other similar discussions.
- "QML or traditional gui?":http://developer.qt.nokia.com/forums/viewthread/1592
- "qml or c++ or both":http://developer.qt.nokia.com/forums/viewthread/714
[quote author="Jayakrishnan.M" date="1291876741"]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 ?[/quote]
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.[quote author="Jayakrishnan.M" date="1291876741"]Is Qml really intended for web widget developers ?[/quote]
No. QML is intended for designers, but it is very similar to JavaScript which is a familiar technology to most Web designers/developers.[quote author="Jayakrishnan.M" date="1291876741"] 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 ?[/quote]
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.[quote author="Jayakrishnan.M" date="1291876741"]Am I forced to learn Qml if I need to create a great UI experience ?[/quote]
Not at all. -
...BTW: I added a tag "all-purpose qml":http://developer.qt.nokia.com/search/tag/all-purpose+qml for collecting QML vs. traditional questions...
-
[quote author="Wolf P." date="1291881587"]Is there much extra-efford to use QML GUIs with traditional desktop applications?[/quote]
I don't think so, but there is a learning curve for the polygot programming and integrating C++ and QML.
[quote author="Wolf P." date="1291881681"]...BTW: I added a tag "all-purpose qml":http://developer.qt.nokia.com/search/tag/all-purpose+qml for collecting QML vs. traditional questions...[/quote]
I don't understand how "all-purpose" refers to QML vs widget-based UIs.
-
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.
-
[quote author="Bradley" date="1291882027"]
[quote author="Wolf P." date="1291881681"]...BTW: I added a tag "all-purpose qml":http://developer.qt.nokia.com/search/tag/all-purpose+qml for collecting QML vs. traditional questions...[/quote]I don't understand how "all-purpose" refers to QML vs widget-based UIs.
[/quote]
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" :)