Active Topics

 


Reply
Thread Tools
Posts: 642 | Thanked: 486 times | Joined on Aug 2008
#1
Hi guys,

I need some advice from QML/C++ developer, I want to develop a new QML and C++ based application (or at least I think I want to use QML and C++, your opinions are welcome on this).

I want to create a app similar to the pocket ebay auctions on Android here: https://market.android.com/details?i...oid_ebay&hl=en

My plan is to use QML for the UI layout and for the fancy (if any!) effects.

My first question is that is this the best way to proceed (i.e. QML and C++/Qt)? (I am mainly a Java developer - but have an interest in learning C++).

My second question is how do I design different screens in QML? should it all of then be in one file? Or should it be a different qml file for different screens (the latter makes sense from a maintenance perspective).

Also does QML have superclass, subclasses, interfaces etc?

Any pointers from QML developers would be most welcome.

Thanks
 

The Following User Says Thank You to rash.m2k For This Useful Post:
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#2
I don't see any reason not to use QML and C++. Since you're targeting the N9, the only other sensible option would be to use QML and Python. I would suggest C++ because not all MeeGo-Harmattan APIs have Python bindings, and the usual benefits of Python are lessened when using QML for the UI code.

You should define any large components (Page, Sheet etc) in separate files. This is neater and also allows reuse of the components. QML does not have the OOP features that you are used to in Java, but you can make use of inheritance by basing one component on another. You can also define your own properties for a component. Properties can be of type string, int, variant etc or they can also be a QML component. C++ objects can also be exposed to QML.

My advice would be to take a look at the documentation both for QML and Qt Components.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following User Says Thank You to marxian For This Useful Post:
Posts: 642 | Thanked: 486 times | Joined on Aug 2008
#3
The documentation only teaches you some stuff, best practices come from developers.

Thank you for your response.

Also I'm a little confused as to how QML is run on the N9 - is QML compiled into native code and then run? And thus would there be a big difference in performance between c++ and QML?
 
nowhereman's Avatar
Posts: 152 | Thanked: 91 times | Joined on Dec 2009 @ Spain
#4
if you want to develop for n9, I think that best way es qml, it's easy, you can do a lot of thinks without arrive to use c++. there are some examples.
I developed wallet application using qml and c++ and I think it's easy
__________________
-----------------------------------------------------------------------------

Protect your confidential information by installing Wallet for N9 and N900.
Visit: http://www.nowhereman.eu
 
marxian's Avatar
Posts: 2,448 | Thanked: 9,523 times | Joined on Aug 2010 @ Wigan, UK
#5
Originally Posted by rash.m2k View Post
The documentation only teaches you some stuff, best practices come from developers.

Thank you for your response.

Also I'm a little confused as to how QML is run on the N9 - is QML compiled into native code and then run? And thus would there be a big difference in performance between c++ and QML?
QML is interpreted at runtime, so there will be an overhead. I'm not qualified to say how significant that overhead is, but I will say that the performance is more than acceptable on my N950 (and the N900 also). I think the biggest hit is in startup time. In any case, there isn't much choice in terms of the UI code. You can still write most of the program logic in C++ to get the best performance possible. I started out using a lot of JavaScript, but have steadily moved the backend code to C++ as I have become more confident with it.
__________________
'Men of high position are allowed, by a special act of grace, to accomodate their reasoning to the answer they need. Logic is only required in those of lesser rank.' - J K Galbraith

My website

GitHub
 

The Following User Says Thank You to marxian For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 19:59.