SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
Necessitas
 Qt on Android

   Johan Thelin
    Pelagicore
Biography
●   Johan Thelin


●   Worked with Qt for 10+ years
●   Foundations in Qt Development
●   Also worked embedded, embedded Linux, enterprise software, web



●   Today – senior developer at Pelagicore
Pelagicore
●   Open source based in-vehicle infotainment
    ●   Member of Linux Foundation
    ●   Ubuntu Core member
    ●   GENIVI member
    ●   Active within MeeGo, etc


●   Uses Qt and QtQuick extensively
    ●   Also HTML5, JavaScript and Android
What is Qt

        “Code less, create more, deploy everywhere”

●   A great framework for creating applications
●   Truly cross-platform
    ●   Desktop
    ●   Devices
●   Licensed for everyone – GPL, LGPL or closed
Qt on Desktop




●   X11
●   OS X
●   Windows
Qt on Devices
●   Linux with X11
    ●   N900, N9
●   Linux without X11
    ●   industrial, etc
●   Symbian
●   WinCE

●   more...
Who runs Qt?
●   Trolltech
●   Bought by Nokia
●   Nokia Qt Development Frameworks


●   Digia develops and licenses Qt Commercial


●   Qt is open source – www.qt-project.org
●   True open governance!
Qt on Devices
●   More than the official ports
    ●   Android


    ●   RIM Blackberry
    ●   WebOS
    ●   iOS
    ●   Kindle


    ●   WP7 can support native code mid-2012 :-)
Qt on Devices
●   More verticals
    ●   Set-top boxes
    ●   Industrial panels
    ●   Tablets

    ●   Your car
Finding the Roots of Qt




        Backends
Backends
●   Backends for OS primitives
    ●   Atomic operations, files, etc
●   Backends for graphics rendering
    ●   Soft, OpenGL, OpenGL ES, GDI, etc
●   Backends for image handling
●   Backends for accessibility
●   Backends for ...
Why Backends




  Portability!
Portability between Devices
●   QPA – Qt Platform Architecture – or something
    ●   Formerly known as Lighthouse


●   A backend for porting Qt to new platforms
    ●   Focused at minimal effort, but with possibilities
Qt on Android
●   Based on Android SDK / NDK
●   QPA
    ●   Necessitas - the actual Qt Port
●   QtCreator (IDE) adaptations
    ●   The tooling
●   Ministro
    ●   The deployment
Current Status
●   Alpha 3 was just released
    ●   Most of Qt is ported
    ●   OpenGL rendering
    ●   WebKit


●   Missing
    ●   Mobility (for many Android Versions)
    ●   Rewriting soft keyboard support
    ●   Android Style and Android Menus
    ●   Development support in non-Linux environments
    ●   Documentation
The Near Future
●   Planning to release First Beta soon
    ●   Will give a stable API/ABI


“...meaning that an application which uses that version will
 run without *any* change, on any further releases! It also
means you can target a billion devices using Qt, much sooner
                   than you expected :)”
Getting Started
●   Installation party!
    ●   OpenJDK
    ●   ant 1.8+
    ●   The necessitas installer downloads and installs
        –   Android SDK + NDK
        –   Platforms for the SDK, etc
    ●   Setup QtCreator
        –   Add path to ant
Installer
Demo Application
Demo Application
●   Strip out some of the crud from the template
    source code – it refers to Symbian
Demo Application
void MainWindow::on_pushButton_clicked()
{
    static int v = 0;
    ui->listWidget->addItem(
        QString("Value%1").arg(v++));
}
Demo Application
Demo Application
 ●   From project directory
$ ls -l android/bin/
total 1988
-rw-rw-r-- 1 e8johan   e8johan    179 2011-11-10 21:42 build.prop
drwxrwxr-x 3 e8johan   e8johan   4096 2011-11-10 21:42 classes
-rw-rw-r-- 1 e8johan   e8johan 33396 2011-11-10 21:42 classes.dex
-rw-rw-r-- 1 e8johan   e8johan   2251 2011-11-10 21:42 classes.dex.d
drwxrwxr-x 6 e8johan   e8johan   4096 2011-11-10 21:42 res
-rw-rw-r-- 1 e8johan   e8johan 431594 2011-11-10 21:42 Widgetdemo.ap_
-rw-rw-r-- 1 e8johan   e8johan   2045 2011-11-10 21:42 Widgetdemo.ap_.d
-rw-rw-r-- 1 e8johan   e8johan 767735 2011-11-10 21:42 Widgetdemo-debug.apk
-rw-rw-r-- 1 e8johan   e8johan 767731 2011-11-10 21:42 Widgetdemo-debug-unaligned.apk
-rw-rw-r-- 1 e8johan   e8johan    305 2011-11-10 21:42 Widgetdemo-debug-unaligned.apk.d
First Run on Phone
●   Installs Ministro – Installs Qt – Resumes
    https://market.android.com/details?id=eu.licentia.necessitas.ministro
Second Run



It simply works!
More on Ministro
●   Qt libraries are shared among all Qt apps on
    the device
●   From the beta release, the ABI is stable, i.e. Qt
    can be upgraded separately from apps
Configurability
●   Android target SDK
    ●   API levels
●   Application icon
●   Permissions
    ●   What your app wants to be able to do
●   Libraries
    ●   Which Qt modules are needed
●   More...
Debugging
●   Yes! :-)


●   Android NDK comes with gdb
    ●   Works with QtCreator
●   Requires some tweaking
    ●   Described in the Necessitas Wiki
Qt and Device UIs




 Got to show you this!
User Interface Development
●   Classic – standard widgets, etc
    ●   Rectangular areas
    ●   Non-overlapping
    ●   Clipping their children
    ●   Provides familiarity


●   Device UIs
    ●   Blend with the device
    ●   Provide a brand feel
    ●   etc
Building Modern UIs
●   No more widgets!
    ●   Canvas / scene
●   Timers everywhere
●   Multiple simultaneous transitions
●   Complex, interconnected state machines


●   Pain! :-)
History of Qt and Modern UIs
●   QCanvas
●   QGraphicsView
●   QTimeLine
●   QGraphicsItemAnimation
●   An animation framework
●   A state machine framework
●   The birth of QtQuick
QtQuick
●   What is QtQuick?
    ●   A run-time for QML
    ●   Tooling


●   What is QML
    ●   Declarative
    ●   JavaScript
QML
import QtQuick 1.0


Rectangle {
    Rectangle {
        MouseArea {
        }
    }
}
QML
Rectangle {
  width: 500
  height: 500


  Rectangle {
QML
Rectangle {
  Rectangle {
    id: box


    color: "red"
    width: 100
    height: 100
    x: 200
QML
MouseArea {
    anchors.fill: parent


    onClicked: {
        if(box.state=="up")
          box.state="down";
        else
          box.state="up";
    }
}
QML
Rectangle {
  state: "up"
  states: [
      State {
           name: "up"
           PropertyChanges { target: box; y: 50 }
      },
      State {
           name: "down"
           PropertyChanges { target: box; y: 350 }
      }
  ]
Demo
QML
Behavior on y {
    PropertyAnimation {
        duration: 1000
        easing.type: Easing.OutBounce
    }
}
Demo
Integrate with C++
●   QObjects to QtQuick
        QObject *foo = …;
        setProperty(“foo”, foo);


●   C++ classes in QtQuick
        class Foo : public QObject { … };
        qmlRegisterType<Foo>("FooLib", 1, 0, "Foo");
        Foo { property: value }



●   QtMediaHub - http://gitorious.org/qtmediahub
QtMediaHub
Of course QtQuick works on Android too.
  With hardware accelerated graphics.
Qt 5
●   A great opportunity to …
    ●   … get rid of API limitations
    ●   … split the repos into more independent parts
    ●   … take advantage of modern C++


●   Widgets and QML are peers
●   More acceleration, shaders, etc – amazing
    performance
A new Dawn
●   Truly Open Source – a www.qt-project.org
●   Qt for Desktop
    ●   Windows / X11 / OS X... more
●   Qt for Devices
    ●   Symbian / Maemo / MeeGo / Android / Blackberry /
        iOS / Kindle... more
Thank you!

 johan.thelin@pelagicore.com



           We're hiring!
http://pelagicore.com/career.html

Contenu connexe

Tendances

OpenGL Introduction.
OpenGL Introduction.OpenGL Introduction.
OpenGL Introduction.
Girish Ghate
 

Tendances (20)

QThreads: Are You Using Them Wrong?
QThreads: Are You Using Them Wrong? QThreads: Are You Using Them Wrong?
QThreads: Are You Using Them Wrong?
 
Qt Internationalization
Qt InternationalizationQt Internationalization
Qt Internationalization
 
Qt for beginners part 2 widgets
Qt for beginners part 2   widgetsQt for beginners part 2   widgets
Qt for beginners part 2 widgets
 
Treinamento Qt básico - aula I
Treinamento Qt básico - aula ITreinamento Qt básico - aula I
Treinamento Qt básico - aula I
 
Best Practices in Qt Quick/QML - Part 3
Best Practices in Qt Quick/QML - Part 3Best Practices in Qt Quick/QML - Part 3
Best Practices in Qt Quick/QML - Part 3
 
A Brief Introduction to the Qt Application Framework
A Brief Introduction to the Qt Application FrameworkA Brief Introduction to the Qt Application Framework
A Brief Introduction to the Qt Application Framework
 
Qt for beginners part 5 ask the experts
Qt for beginners part 5   ask the expertsQt for beginners part 5   ask the experts
Qt for beginners part 5 ask the experts
 
Qt and QML performance tips & tricks for Qt 4.7
Qt and QML performance tips & tricks for Qt 4.7Qt and QML performance tips & tricks for Qt 4.7
Qt and QML performance tips & tricks for Qt 4.7
 
Qt Widget In-Depth
Qt Widget In-DepthQt Widget In-Depth
Qt Widget In-Depth
 
Qt 5 - C++ and Widgets
Qt 5 - C++ and WidgetsQt 5 - C++ and Widgets
Qt 5 - C++ and Widgets
 
Optimizing Performance in Qt-Based Applications
Optimizing Performance in Qt-Based ApplicationsOptimizing Performance in Qt-Based Applications
Optimizing Performance in Qt-Based Applications
 
Intro to QML / Declarative UI
Intro to QML / Declarative UIIntro to QML / Declarative UI
Intro to QML / Declarative UI
 
Migrating from Photon to Qt
Migrating from Photon to QtMigrating from Photon to Qt
Migrating from Photon to Qt
 
So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?So I Downloaded Qt, Now What?
So I Downloaded Qt, Now What?
 
Hello, QML
Hello, QMLHello, QML
Hello, QML
 
Treinamento Qt básico - aula II
Treinamento Qt básico - aula IITreinamento Qt básico - aula II
Treinamento Qt básico - aula II
 
Opengl (1)
Opengl (1)Opengl (1)
Opengl (1)
 
Meet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UIMeet the Widgets: Another Way to Implement UI
Meet the Widgets: Another Way to Implement UI
 
OpenGL Introduction.
OpenGL Introduction.OpenGL Introduction.
OpenGL Introduction.
 
QVariant, QObject — Qt's not just for GUI development
QVariant, QObject — Qt's not just for GUI developmentQVariant, QObject — Qt's not just for GUI development
QVariant, QObject — Qt's not just for GUI development
 

Similaire à Necessitas - Qt on Android - from FSCONS 2011

Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13
Daker Fernandes
 
Qt Tutorial - Part 1
Qt Tutorial - Part 1Qt Tutorial - Part 1
Qt Tutorial - Part 1
rmitc
 
Mp25: Mobile dev with QT and Python for the Notorious N9
Mp25: Mobile dev with QT and Python for the Notorious N9Mp25: Mobile dev with QT and Python for the Notorious N9
Mp25: Mobile dev with QT and Python for the Notorious N9
Montreal Python
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
Rodrigo Gil
 

Similaire à Necessitas - Qt on Android - from FSCONS 2011 (20)

Migrating from Photon to Qt
Migrating from Photon to QtMigrating from Photon to Qt
Migrating from Photon to Qt
 
Targeting Android with Qt
Targeting Android with QtTargeting Android with Qt
Targeting Android with Qt
 
Network programming with Qt (C++)
Network programming with Qt (C++)Network programming with Qt (C++)
Network programming with Qt (C++)
 
Andreas Jakl Software Development on Nokia Deviceswith Qt
Andreas Jakl Software Development on Nokia Deviceswith QtAndreas Jakl Software Development on Nokia Deviceswith Qt
Andreas Jakl Software Development on Nokia Deviceswith Qt
 
Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13
 
Qt for beginners part 4 doing more
Qt for beginners part 4   doing moreQt for beginners part 4   doing more
Qt for beginners part 4 doing more
 
Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017Qt Automotive Suite - under the hood // Qt World Summit 2017
Qt Automotive Suite - under the hood // Qt World Summit 2017
 
Cutest technology of them all - Forum Nokia Qt Webinar December 2009
Cutest technology of them all - Forum Nokia Qt Webinar December 2009Cutest technology of them all - Forum Nokia Qt Webinar December 2009
Cutest technology of them all - Forum Nokia Qt Webinar December 2009
 
Qt Tutorial - Part 1
Qt Tutorial - Part 1Qt Tutorial - Part 1
Qt Tutorial - Part 1
 
Qt for Python
Qt for PythonQt for Python
Qt for Python
 
Update on the open source browser space (16th GENIVI AMM)
Update on the open source browser space (16th GENIVI AMM)Update on the open source browser space (16th GENIVI AMM)
Update on the open source browser space (16th GENIVI AMM)
 
OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...
OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...
OSDC 2016 | rkt and Kubernetes: What’s new with Container Runtimes and Orches...
 
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
OSDC 2016 - rkt and Kubernentes what's new with Container Runtimes and Orches...
 
Qt
QtQt
Qt
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
Porting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - WebinarPorting Motif Applications to Qt - Webinar
Porting Motif Applications to Qt - Webinar
 
Green Custard Friday Talk 22: Flutter
Green Custard Friday Talk 22: FlutterGreen Custard Friday Talk 22: Flutter
Green Custard Friday Talk 22: Flutter
 
Mp25: Mobile dev with QT and Python for the Notorious N9
Mp25: Mobile dev with QT and Python for the Notorious N9Mp25: Mobile dev with QT and Python for the Notorious N9
Mp25: Mobile dev with QT and Python for the Notorious N9
 
Qt Technical Presentation
Qt Technical PresentationQt Technical Presentation
Qt Technical Presentation
 
Programming for non tech entrepreneurs
Programming for non tech entrepreneursProgramming for non tech entrepreneurs
Programming for non tech entrepreneurs
 

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Dernier (16)

Genuine 8617370543 Hot and Beautiful 💕 Etah Escorts call Girls
Genuine 8617370543 Hot and Beautiful 💕 Etah Escorts call GirlsGenuine 8617370543 Hot and Beautiful 💕 Etah Escorts call Girls
Genuine 8617370543 Hot and Beautiful 💕 Etah Escorts call Girls
 
Unveiling the Mystery of Main Bazar Chart
Unveiling the Mystery of Main Bazar ChartUnveiling the Mystery of Main Bazar Chart
Unveiling the Mystery of Main Bazar Chart
 
Albania Vs Spain South American coaches lead Albania to Euro 2024 spot.docx
Albania Vs Spain South American coaches lead Albania to Euro 2024 spot.docxAlbania Vs Spain South American coaches lead Albania to Euro 2024 spot.docx
Albania Vs Spain South American coaches lead Albania to Euro 2024 spot.docx
 
Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...
Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...
Italy vs Albania Italy Euro 2024 squad Luciano Spalletti's full team ahead of...
 
Slovenia Vs Serbia Eurovision odds Slovenia have top.docx
Slovenia Vs Serbia Eurovision odds Slovenia have top.docxSlovenia Vs Serbia Eurovision odds Slovenia have top.docx
Slovenia Vs Serbia Eurovision odds Slovenia have top.docx
 
Croatia vs Italy Inter Milan Looking to Carry On Success at Euro 2024.pdf
Croatia vs Italy Inter Milan Looking to Carry On Success at Euro 2024.pdfCroatia vs Italy Inter Milan Looking to Carry On Success at Euro 2024.pdf
Croatia vs Italy Inter Milan Looking to Carry On Success at Euro 2024.pdf
 
Hire 💕 8617370543 Amethi Call Girls Service Call Girls Agency
Hire 💕 8617370543 Amethi Call Girls Service Call Girls AgencyHire 💕 8617370543 Amethi Call Girls Service Call Girls Agency
Hire 💕 8617370543 Amethi Call Girls Service Call Girls Agency
 
Netherlands Players expected to miss UEFA Euro 2024 due to injury.docx
Netherlands Players expected to miss UEFA Euro 2024 due to injury.docxNetherlands Players expected to miss UEFA Euro 2024 due to injury.docx
Netherlands Players expected to miss UEFA Euro 2024 due to injury.docx
 
Cricket Api Solution.pdfCricket Api Solution.pdf
Cricket Api Solution.pdfCricket Api Solution.pdfCricket Api Solution.pdfCricket Api Solution.pdf
Cricket Api Solution.pdfCricket Api Solution.pdf
 
JORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdf
JORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdfJORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdf
JORNADA 6 LIGA MURO 2024TUXTEPECOAXACA.pdf
 
basketball evolution History Slides.pdf
basketball evolution  History Slides.pdfbasketball evolution  History Slides.pdf
basketball evolution History Slides.pdf
 
Belgium Vs Slovakia Belgium at Euro 2024 Teams in group, fixtures, schedule, ...
Belgium Vs Slovakia Belgium at Euro 2024 Teams in group, fixtures, schedule, ...Belgium Vs Slovakia Belgium at Euro 2024 Teams in group, fixtures, schedule, ...
Belgium Vs Slovakia Belgium at Euro 2024 Teams in group, fixtures, schedule, ...
 
Personal Brand Exploration - By Bradley Dennis
Personal Brand Exploration - By Bradley DennisPersonal Brand Exploration - By Bradley Dennis
Personal Brand Exploration - By Bradley Dennis
 
Spain Vs Italy Spain to be banned from participating in Euro 2024.docx
Spain Vs Italy Spain to be banned from participating in Euro 2024.docxSpain Vs Italy Spain to be banned from participating in Euro 2024.docx
Spain Vs Italy Spain to be banned from participating in Euro 2024.docx
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics TradeTechnical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
Technical Data | Sig Sauer Easy6 BDX 1-6x24 | Optics Trade
 

Necessitas - Qt on Android - from FSCONS 2011

  • 1. Necessitas Qt on Android Johan Thelin Pelagicore
  • 2. Biography ● Johan Thelin ● Worked with Qt for 10+ years ● Foundations in Qt Development ● Also worked embedded, embedded Linux, enterprise software, web ● Today – senior developer at Pelagicore
  • 3. Pelagicore ● Open source based in-vehicle infotainment ● Member of Linux Foundation ● Ubuntu Core member ● GENIVI member ● Active within MeeGo, etc ● Uses Qt and QtQuick extensively ● Also HTML5, JavaScript and Android
  • 4. What is Qt “Code less, create more, deploy everywhere” ● A great framework for creating applications ● Truly cross-platform ● Desktop ● Devices ● Licensed for everyone – GPL, LGPL or closed
  • 5. Qt on Desktop ● X11 ● OS X ● Windows
  • 6. Qt on Devices ● Linux with X11 ● N900, N9 ● Linux without X11 ● industrial, etc ● Symbian ● WinCE ● more...
  • 7. Who runs Qt? ● Trolltech ● Bought by Nokia ● Nokia Qt Development Frameworks ● Digia develops and licenses Qt Commercial ● Qt is open source – www.qt-project.org ● True open governance!
  • 8. Qt on Devices ● More than the official ports ● Android ● RIM Blackberry ● WebOS ● iOS ● Kindle ● WP7 can support native code mid-2012 :-)
  • 9. Qt on Devices ● More verticals ● Set-top boxes ● Industrial panels ● Tablets ● Your car
  • 10. Finding the Roots of Qt Backends
  • 11. Backends ● Backends for OS primitives ● Atomic operations, files, etc ● Backends for graphics rendering ● Soft, OpenGL, OpenGL ES, GDI, etc ● Backends for image handling ● Backends for accessibility ● Backends for ...
  • 12. Why Backends Portability!
  • 13. Portability between Devices ● QPA – Qt Platform Architecture – or something ● Formerly known as Lighthouse ● A backend for porting Qt to new platforms ● Focused at minimal effort, but with possibilities
  • 14. Qt on Android ● Based on Android SDK / NDK ● QPA ● Necessitas - the actual Qt Port ● QtCreator (IDE) adaptations ● The tooling ● Ministro ● The deployment
  • 15. Current Status ● Alpha 3 was just released ● Most of Qt is ported ● OpenGL rendering ● WebKit ● Missing ● Mobility (for many Android Versions) ● Rewriting soft keyboard support ● Android Style and Android Menus ● Development support in non-Linux environments ● Documentation
  • 16. The Near Future ● Planning to release First Beta soon ● Will give a stable API/ABI “...meaning that an application which uses that version will run without *any* change, on any further releases! It also means you can target a billion devices using Qt, much sooner than you expected :)”
  • 17. Getting Started ● Installation party! ● OpenJDK ● ant 1.8+ ● The necessitas installer downloads and installs – Android SDK + NDK – Platforms for the SDK, etc ● Setup QtCreator – Add path to ant
  • 20. Demo Application ● Strip out some of the crud from the template source code – it refers to Symbian
  • 21. Demo Application void MainWindow::on_pushButton_clicked() { static int v = 0; ui->listWidget->addItem( QString("Value%1").arg(v++)); }
  • 23. Demo Application ● From project directory $ ls -l android/bin/ total 1988 -rw-rw-r-- 1 e8johan e8johan 179 2011-11-10 21:42 build.prop drwxrwxr-x 3 e8johan e8johan 4096 2011-11-10 21:42 classes -rw-rw-r-- 1 e8johan e8johan 33396 2011-11-10 21:42 classes.dex -rw-rw-r-- 1 e8johan e8johan 2251 2011-11-10 21:42 classes.dex.d drwxrwxr-x 6 e8johan e8johan 4096 2011-11-10 21:42 res -rw-rw-r-- 1 e8johan e8johan 431594 2011-11-10 21:42 Widgetdemo.ap_ -rw-rw-r-- 1 e8johan e8johan 2045 2011-11-10 21:42 Widgetdemo.ap_.d -rw-rw-r-- 1 e8johan e8johan 767735 2011-11-10 21:42 Widgetdemo-debug.apk -rw-rw-r-- 1 e8johan e8johan 767731 2011-11-10 21:42 Widgetdemo-debug-unaligned.apk -rw-rw-r-- 1 e8johan e8johan 305 2011-11-10 21:42 Widgetdemo-debug-unaligned.apk.d
  • 24. First Run on Phone ● Installs Ministro – Installs Qt – Resumes https://market.android.com/details?id=eu.licentia.necessitas.ministro
  • 26. More on Ministro ● Qt libraries are shared among all Qt apps on the device ● From the beta release, the ABI is stable, i.e. Qt can be upgraded separately from apps
  • 27. Configurability ● Android target SDK ● API levels ● Application icon ● Permissions ● What your app wants to be able to do ● Libraries ● Which Qt modules are needed ● More...
  • 28. Debugging ● Yes! :-) ● Android NDK comes with gdb ● Works with QtCreator ● Requires some tweaking ● Described in the Necessitas Wiki
  • 29. Qt and Device UIs Got to show you this!
  • 30. User Interface Development ● Classic – standard widgets, etc ● Rectangular areas ● Non-overlapping ● Clipping their children ● Provides familiarity ● Device UIs ● Blend with the device ● Provide a brand feel ● etc
  • 31. Building Modern UIs ● No more widgets! ● Canvas / scene ● Timers everywhere ● Multiple simultaneous transitions ● Complex, interconnected state machines ● Pain! :-)
  • 32. History of Qt and Modern UIs ● QCanvas ● QGraphicsView ● QTimeLine ● QGraphicsItemAnimation ● An animation framework ● A state machine framework ● The birth of QtQuick
  • 33. QtQuick ● What is QtQuick? ● A run-time for QML ● Tooling ● What is QML ● Declarative ● JavaScript
  • 34. QML import QtQuick 1.0 Rectangle { Rectangle { MouseArea { } } }
  • 35. QML Rectangle { width: 500 height: 500 Rectangle {
  • 36. QML Rectangle { Rectangle { id: box color: "red" width: 100 height: 100 x: 200
  • 37. QML MouseArea { anchors.fill: parent onClicked: { if(box.state=="up") box.state="down"; else box.state="up"; } }
  • 38. QML Rectangle { state: "up" states: [ State { name: "up" PropertyChanges { target: box; y: 50 } }, State { name: "down" PropertyChanges { target: box; y: 350 } } ]
  • 39. Demo
  • 40. QML Behavior on y { PropertyAnimation { duration: 1000 easing.type: Easing.OutBounce } }
  • 41. Demo
  • 42. Integrate with C++ ● QObjects to QtQuick QObject *foo = …; setProperty(“foo”, foo); ● C++ classes in QtQuick class Foo : public QObject { … }; qmlRegisterType<Foo>("FooLib", 1, 0, "Foo"); Foo { property: value } ● QtMediaHub - http://gitorious.org/qtmediahub
  • 44. Of course QtQuick works on Android too. With hardware accelerated graphics.
  • 45. Qt 5 ● A great opportunity to … ● … get rid of API limitations ● … split the repos into more independent parts ● … take advantage of modern C++ ● Widgets and QML are peers ● More acceleration, shaders, etc – amazing performance
  • 46. A new Dawn ● Truly Open Source – a www.qt-project.org ● Qt for Desktop ● Windows / X11 / OS X... more ● Qt for Devices ● Symbian / Maemo / MeeGo / Android / Blackberry / iOS / Kindle... more
  • 47. Thank you! johan.thelin@pelagicore.com We're hiring! http://pelagicore.com/career.html