22
Targeting multiple mobile platforms with Qt Creator Aurindam Jana

Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

  • Upload
    others

  • View
    24

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Targeting multiple mobile platforms with Qt Creator

Aurindam Jana

Page 2: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

QML

Aurindam JanaIRC: auri__ : #qt #qt-creator

http://www.apple.com http://www.clker.com http://qt-project.org http://svengraph.deviantart.com

Page 3: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Target Audience

● Users migrating from Desktop to Mobile platforms.

● Users targeting multiple Mobile platforms with new or existing apps.

Page 4: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Strategies to target multiple mobile platforms

Develop and deploy using Qt Creator

Agenda

http://www.iconarchive.com/artist/svengraph.html http://www.iconarchive.com/artist/dakirby309.html

Page 5: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Strategies to target multiple mobile platforms with Qt

http://www.iconarchive.com/artist/svengraph.html http://www.iconarchive.com/artist/dakirby309.html

Page 6: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Qt is glorious!

● Faster Development Time

– Shorter learning curve

– Common code base

– Comprehensive cross-platform tools

● High performance

● Smaller and cohesive team

● Higher ROI, Faster Time to market

Page 7: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

... but Qt is not a magician!

● Functional tools.

● Need to use them appropriately.

Page 8: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

UI / Presentation LayerQML

Model / Controller / Engine / BackendC++

Application Architecture

Page 9: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

http://www.iconarchive.com/artist/designcontest.html http://www.iconarchive.com/artist/svengraph.html http://developer.android.com/design/style/iconography.html

QML Presentation Layer

Resource LoaderQFileSelector / QQmlFileSelector

C++ Engine

UI Resources

Page 10: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Native UI (Look-and-Feel)

Android BB10 iOS

QML Presentation Layer

C++ Backend

...

Page 11: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

UI Navigation

QML Presentation Layer

C++ BackendState machine

Page 12: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Platform / Device features

Page 13: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Code Maintainence

● Smoke check builds after incremental changes

● Test performance and UI on all platforms after incremental changes

● CI is your best friend

Page 14: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Develop and deploy using Qt Creator

http://www.iconarchive.com/artist/svengraph.html http://www.iconarchive.com/artist/dakirby309.html

Page 15: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Qt Development toolsQt Creator

http://www.iconarchive.com/artist/babasse.html http://www.stevenbrown.ca/blog/archives/tag/icons http://www.iconarchive.com/artist/mattahan.html http://www.doublejdesign.co.uk http://www.iconarchive.com/artist/designcontest.html http://www.iconarchive.com/artist/svengraph.html http://git-scm.com/downloads/logos

Page 16: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Qt Development toolsVersion info

● Qt version info – 5.1.1

● Qt Creator version info – 3.0

● Sailfish SDK version info – latest alpha (Oct 1, 2013)

Page 17: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Setting up Android

● Android SDK

– For Windows: Install Android Debug Bridge provided by device manufacturer to enable USB debugging.

● Android NDK

● Apache Ant v1.8 or later

● JDK / OpenJDK v6 or later

● Run <adb>/sdk/tools/android update sdk

● Configure Qt Creator

Page 18: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Setting up Blackberry

● Blackberry 10 NDK

● Run sdkinstall --install x.x.x.x

● Run sdkinstall --simulator (Requires VMPlayer)

● Configure Qt Creator

Page 19: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Setting up for iOS

● Install latest XCode

– iOS SDK

– Command line tools

● Get a developer license

● Configure Qt Creator

● Deployment works out of the box

● Debugging support – Qt Creator 3.0

Page 20: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

Setting up for Sailfish

● Requires VirtualBox

● Sailfish SDK from www.sailfish.org website

Page 21: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

● Dedicated Resource Handler

● Keep styles in separate QML components

● Use a state machine for UI navigation

● Do not assume platform / device features

● CI is your best friend

● Development environment setup

● Build and Deploy

Summary

Page 22: Targeting multiple mobile platforms with Qt Creator · 2015-03-23 · Mobile platforms. Users targeting ... C++ Engine UI Resources. Native UI (Look-and-Feel) Android BB10 iOS QML

THANK YOU

Contact

IRC: auri__ : #qt #qt-creator