Results 1 to 2 of 2

Thread: Mobile App Development with Qt 5.3

  1. #1
    Join Date
    Apr 2012
    Posts
    21
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Windows

    Default Mobile App Development with Qt 5.3

    Is there any thorough tutorial for developing mobile applications with Qt 5.3?
    I didn't find any good tutorial or well described step by step example. Almost all QML and Qt Quick tutorials and examples are old.

    It would be great if someone here could help me and answer just some of numerous questions.


    1. How to start? The app is supposed to run on Android and iOS devices. Create new Qt Quick Application project or something else?
    2. How to create custom buttons with background color/image and text? Should it be customized Button control or Rectangle with child objects Image and text?
    3. How to create and handle button_click event? Where is it handled, in C++ code behind QML file?
    4. How are QML and C++ classes/files connected?
    5. How to create couple of pages and navigate through them, i.e. after button click on one page, the other page should be opened?
    6. Where are saved user data from application? For example, Settings page have some textboxes and value that user entered must be saved ond available after opening the app next time?


    There are a lot of questions but there is no point to write them all.

  2. #2
    Join Date
    Jan 2006
    Location
    Graz, Austria
    Posts
    8,416
    Thanks
    37
    Thanked 1,544 Times in 1,494 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: Mobile App Development with Qt 5.3

    Quote Originally Posted by juracist View Post
    Is there any thorough tutorial for developing mobile applications with Qt 5.3?
    I didn't find any good tutorial or well described step by step example. Almost all QML and Qt Quick tutorials and examples are old.
    There wasn't much change in the things that QtQuick can do in regards of what tutorials usually cover so you should be good.
    But you could also look at http://qmlbook.org/


    Quote Originally Posted by juracist View Post
    1. How to start? The app is supposed to run on Android and iOS devices. Create new Qt Quick Application project or something else?
    In general definitely good start, especially since you have just started using QtQuick.
    The SDK downloads for mobile platforms might have specialized templates that also contain platform specific stuff, but since you want to target multiple platforms you'll need to combine these anyway at some point.

    Quote Originally Posted by juracist View Post
    2. How to create custom buttons with background color/image and text? Should it be customized Button control or Rectangle with child objects Image and text?
    I would go for QtQuick.Controls Button, but a custom button type would work as well for that use case.

    Quote Originally Posted by juracist View Post
    3. How to create and handle button_click event? Where is it handled, in C++ code behind QML file?
    The button has a "clicked" signal, so in QML you can have an "onClicked" signal handler.
    If you are using QtQuick.Controls Button, you can also associate an Action with the button and react to its "triggered" signal.
    If the reaction is something simple it is often done directly in QML, more complex tasks are usually better delegated to a C++ method.

    Quote Originally Posted by juracist View Post
    4. How are QML and C++ classes/files connected?
    You can export objects from C++, pass objects from QML to C++ and have QML create objects that are implemented in C++.

    Quote Originally Posted by juracist View Post
    5. How to create couple of pages and navigate through them, i.e. after button click on one page, the other page should be opened?
    Multiple options really.
    One way is to create all screens upfront and change their visbility as needed.
    Another option is to use Loader to load pages or parts of pages on demand.
    In either case using a statemachine might come in handy as well.

    Quote Originally Posted by juracist View Post
    6. Where are saved user data from application? For example, Settings page have some textboxes and value that user entered must be saved ond available after opening the app next time?
    QSettings.

    Cheers,
    _

  3. The following user says thank you to anda_skoa for this useful post:

    juracist (9th August 2014)

Similar Threads

  1. Mobile application development
    By Rocksteady in forum General Programming
    Replies: 0
    Last Post: 11th September 2012, 13:25
  2. GUI Development Help
    By Atomic_Sheep in forum Newbie
    Replies: 11
    Last Post: 28th June 2011, 12:26
  3. mobile extensions problems in Qt mobile app
    By hasnain in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 31st December 2010, 12:29
  4. Replies: 1
    Last Post: 13th August 2009, 17:32

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.