3

Well I've been coding in qt for about 6 months now and I have a pretty good grasp of QWidget and c++ coding for desktop apps but I run a small company and we are developing phone apps and desktop apps for a project that we are doing and as the project manager I fell that qt is the answer for not having to have separate teams coding for android and iPhone.

So the solution is coding in qt. but I'm a little confused about a few things. I see that a lot of the event handling of button clicks and things are handled actually in qt quick but as our apps would be quite complex in the bg we would have to be able to code in c++ the QWidget conventional way. So my question is:

  1. Which is better QWidget or Qt quick better for developing our apps which should be compatible across most platforms, mostly tablet and smart phones.

  2. If we go the qt Quick way then can you simultaneously use qt quick for most of the visual and then link up these files to c++ files (the engine of your app)? m if so any examples of how I might get started on learning how to do this.

  3. Is there any really good resources on how to develop these phone apps, tutorials and things like that, as I'm a little worried about the lack of resources for learning.

  4. Am I correct in thinking that if we did go with qt quick that these apps would also be compatible with Ubuntu phone?

TheMan68
  • 1,429
  • 6
  • 26
  • 48

1 Answers1

5
  1. I've developed applications for maemo and meego, and I'd say that QtQuick is better and much easier.

  2. I'd say that QML and C++ qt-backend introduces an MVC pattern where QML is View and C++ is model and controller. QML is not just a script you can run. You need an object of QDeclarativeScript in C++ and pass main qml file to it to be able to start. So, anyway you will run C++ application first, which will parse QML script. To the last part of question: you may create C++ classes to export into QML and use it there. It is very simple, you may read official guides of QtQuick, it is goodly explained there.

  3. Here is nothing special. Simply import files into qml-project and just use controls, containers and etc. Each project, be it ubuntu phone or sailfish, have a tutorials, guides and wiki. More, I'm KDE contributor and developed plasma widgets on QML - the same thing here, - all you need is to import and just use.

  4. Of course. Why not? But you need to have a toolchain for QtCreator to be able to compile your project for target architecture and be able to run it there.

VP.
  • 15,509
  • 17
  • 91
  • 161
  • Wow thank you very much for your answer. I'm still struggling with this in all honesty as I'm following the official qt tut on phone apps http://blog.qt.digia.com/blog/2013/07/09/qt-creator-for-qt-enterprise-users/ but I don't see any of the options in the menu to drag onto the canvas i.e buttons and things so im still at a loss. Would it be possible to get your skype or something so i could have a more detailed discussion about this ? – TheMan68 Jan 29 '14 at 10:02
  • Contacting directly a user here is not possible [due to some reasons](http://meta.stackexchange.com/questions/57537/how-do-i-contact-other-users) and I wont to post my email or skype right here because it will be visible for everyone, I'm sorry. But you may always ask your questions right here and community will be glad to answer on them. – VP. Jan 29 '14 at 10:21
  • Thank you very much. here is a link to my first qu on my learning qt mobile quest lol. http://stackoverflow.com/questions/21437841/how-to-connect-a-qt-quick-button-click-to-a-c-method – TheMan68 Jan 29 '14 at 17:09
  • Hi victor. Thank you very much. I'm getting there thanks to your help. I have taken a look and I've been trying to do an animation on a little bit of a complex layout that I need to duplicate but I'm getting some weird results, so I just put the question up on to stack overflow but as of yet no luck in any answers. I don't suppose there would be any chance of you taking a look at it for me would you please. Very much appreciated. "http://stackoverflow.com/questions/21509365/complex-group-animation-in-qtquick-2-0" Thanks – TheMan68 Feb 03 '14 at 06:41