Your SlideShare is downloading. ×
Andreas Jakl Software Development on Nokia Deviceswith Qt
Upcoming SlideShare
Loading in...5

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Andreas Jakl Software Development on Nokia Deviceswith Qt


Published on

Software Development on Nokia Devices with Qt/ Andreas Jakl, 5. 3.2010 Hagenberg

Software Development on Nokia Devices with Qt/ Andreas Jakl, 5. 3.2010 Hagenberg

Published in: Technology, Education
  • Be the first to comment

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

No notes for slide


  • 1. Qt Qt™ Software Development on Nokia Devices with Qt Qt is © Nokia Corporation and/or its subsidiaries. Nokia, Qt d th i N ki Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide. ti l t d k f N ki C ti i Fi l d d/ th ti ld id All other trademarks are property of their respective owners. 1 Andreas Jakl, 2010 v1.0 – 5.3.2010
  • 2. About Me: Andreas Jakl About Me: Andreas Jakl 2 Andreas Jakl, 2010
  • 3. Qt in a Nutshell in a Nutshell Qt is a class library for platform  independent development of graphical  user interfaces based on C++. The framework also includes XML,  The framework also includes XML, databases, internationalization,  network, multithreading, 3D,  WebKit m ltimedia etc WebKit, multimedia, etc. 3 Andreas Jakl, 2010
  • 4. Short History Short History of Qt ● 1991: Development started − Cross platform GUI toolkit was needed ● 1994: Decided to go into business − “Q” looked beautiful in Emacs font. “t” for toolkit Eirik Chambe‐ Haavard − Company name: Quasar Technologies  Eng Nord (later: Trolltech) ● 1995: First public release through newsgroups (Qt 0.90) − Dual licensing: commercial & free for open source ● 2000: Qtopia – platform for mobile phones & PDAs ● 2005: Qt 4.0 – compatibility break, leads to new KDE 4 desktop Q p y , p ● 2008: Nokia purchases Qt, name changes first to Qt Software, then to Qt Development Frameworks ● 2009 / 2010: Focus on mobile platforms (Symbian, Maemo, MeeGo), dedicated mobility APIs 4 Andreas Jakl, 2010
  • 5. Customers 5 Andreas Jakl, 2010 … and many, many more!
  • 6. Qt Licensing ● LGPL license ● Qt is completely free! − Unlike GPL, the LGPL: Unlike GPL the LGPL – Allows using Qt for free in commercial, closed source apps − Complete development source code of Qt available C l t d l t d f Qt il bl ● Commercial version − Code changes to Qt source code don’t have to be shared − Included support options 6 Andreas Jakl, 2010
  • 7. Platforms Windows Mac OS Linux / X11 Linux / X11 C++ Embedded Linux Windows CE Windows CE Maemo / MeeGo Java Symbian (S60) S bi (S60) Python Ada Pascal Maintained by Perl Qt open source community. PHP Not officially supported by Qt Development Frameworks. Not officially supported by Qt Development Frameworks 7 Andreas Jakl, 2010
  • 8. Mobile Development Mobile Development Java ME 8 Andreas Jakl, 2010
  • 9. Symbian and Symbian and Qt ● Symbian^4: replaces S60 with Qt‐based UI y p Q ● Components: − Uiemo (UI Extensions for Mobile, Orbit):  extension library for Qt, 50+ UI elements  tailored for mobile t il d f bil − Direct UI: new app framework based on  Uiemo ● Availability: end of 2010 Symbian^4 Concept Video 9 Andreas Jakl, 2010
  • 10. Maemo and Maemo and Qt ● Maemo 5 − GTK+ based UI − Final Qt support: H1 2010 Final Qt support: H1 2010 ● Maemo 6 − Qt replaces GTK+ replaces GTK+ − Multi‐touch, gestures support − MeeGo M G compatible tibl − GTK and Clutter will stay in MeeGo 10 Andreas Jakl, 2010
  • 11. MeeGo and Qt MeeGo and Qt ● Moblin (Intel) and Maemo (Nokia) merge to  ( ) ( ) g − New Linux distribution − MeeGo UI toolkit based on Qt lki b d − GTK and Clutter included for application compatibility 11 Andreas Jakl, 2010
  • 12. Qt Architecture ● Qt uses native styles to draw UI − UI elements have original  look & feel − Can be adapted by the Can be adapted by the  developer ● Built on low level APIs of platform − No runtime! ● Cross‐platform − Single source for multiple  Si l f li l platforms − Only requires recompilation 12 Andreas Jakl, 2010
  • 13. Qt Modules Module Description QtCore Core non‐graphical classes used by other modules QtGui Graphical user interface (GUI) components QtMultimedia Classes for low‐level multimedia functionality QtNetwork Classes for network programming QtOpenGL OpenGL support classes QtOpenVG OpenVG support classes QtSc pt ( oo s) QtScript (Tools) Make C++ applications scriptable through ECMAScript‐based language a e app ca o s sc p ab e oug Sc p based a guage QtSql Classes for database integration using SQL QtSvg Classes for displaying contents of SVG files QtWebKit Classes for displaying and editing web content Classes for displaying and editing web content QtXml Classes for handling XML QtXmlPatterns An XQuery & XPath engine for XML and custom data models Phonon Ph Multimedia framework classes M l i di f k l 13 Andreas Jakl, 2010
  • 14. Getting Started Install Qt SDK from Q q Start Qt Creator UI 14 Andreas Jakl, 2010
  • 15. Hello World Project World Project main.cpp #include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton helloButton("Hello World"); helloButton.resize(150, 50);; return app.exec(); } 15 Andreas Jakl, 2010
  • 16. Deploy ● Run your Qt application on all platforms! y Q pp p Windows 7 Maemo 5 Symbian^1 y (S60 5th Edition) 16 Andreas Jakl, 2010
  • 17. Qt and C Qt and C++ ● Q g Qt goes beyond C++ y − Seamless object communication ( g (signals & slots) ) − Meta object system, featuring  object properties and object trees j p p j − Contextual string translation for  internationalization ● … but still works with standard C++  compilers on all platforms! 17 Andreas Jakl, 2010
  • 18. Interactivity: Quit Interactivity: Quit Hello World ● Add functionality to exit the Hello World example: y p QObject::connect(&helloButton, SIGNAL(clicked()), &app, &app SLOT(quit())); − Button emits clicked() signal − Connected to QApplication::quit() 18 Andreas Jakl, 2010
  • 19. Signals & Slots Signals & Slots ● Signal − Emitted when a particular event occurs (e.g., clicked()) − Qt widgets: predefined signals − Also create your own signals ● Slot − Function called in response to a signal − Qt widgets: predefined slots (e.g., quit()) − Also create your own slots Al t l t ● Connection signals  slots established by developer,  handled by Qt framework y 19 Andreas Jakl, 2010
  • 20. What’s next? The Future of Qt Q 20 Andreas Jakl, 2010
  • 21. Qt Quick (Qt User Interface Creation Kit) Qt Quick (Qt User Interface Creation Kit) ● Create UIs as a designer g − Without C++ knowledge − Using visual tools Using visual tools − Module: Declarative UI − Based on QML l B d QML language  (extension to JavaScript) − Supported in Qt 4.7 Supported in Qt 4 7 −‐qt‐quick/ 21 Andreas Jakl, 2010
  • 22. QML ● Describe UI by tree structure of  y property bindings − Properties dynamically evaluated dynamically evaluated Rectangle { − Communication through  width: 200 signals & slots signals & slots height: 200 height: 200 color: "white" − Bindings to C++ code possible Image { source:  pics/logo.png source: "pics/logo png" − Animate properties using states anchors.centerIn: parent and transitions } } 22 Andreas Jakl, 2010
  • 23. UI Frameworks (Dui, Uiemo) UI Frameworks (Dui, Uiemo) ● Scene graph approach to the UI g p pp ● Optimized for Maemo 6 UI Framework Widget Demo  (15.2.2010) − Graphics effects, 3D HW acceleration − Gestures, multi‐touch, kinetics ● Adventurous? − Maemo:‐6‐ui‐framework Maemo http //qt gitorious org/maemo 6 ui framework − Symbian: 23 Andreas Jakl, 2010
  • 24. Hybrid Applications Hybrid Applications HTML App Qt Web  Technology Qt 24 Andreas Jakl, 2010 From: Rajesh Lal‐application‐development‐for‐maemo‐n900‐device
  • 25. Advantages of Hybrid Applications Advantages of Hybrid Applications Web Qt HTML, CSS, JavaScript C++ Rapid development p p Full device access Broad reach Powerful libraries Embed Qt UI elements into HTML page Access Qt objects from JavaScript j p Trigger JavaScript from Qt Shared storage 25 Andreas Jakl, 2010‐whitepaper‐hybrid
  • 26. Qt Mobility Qt Mobility ● Q Qt: Desktop → Mobile p ● Requires new APIs for − Sensors S − Location − Messaging − etc. ● Qt Mobility: new cross‐platform APIs for mobile use cases − Back‐end implementation on all platforms where it makes sense Back‐end implementation on all platforms where it makes sense 26 Andreas Jakl, 2010
  • 27. Qt 4.7 ● Q Qt 4.7 Tech Preview: March 2010 − Includes Qt Quick − Integrates f first parts of Qt Mobility f bili − Focus on performance ●‐roadmap 27 Andreas Jakl, 2010
  • 28. Qt Books C++ GUI Programming with Qt 4 (2nd edition) C++ GUI Programming with Qt 4 (2 Jasmin Blanchette, Mark Summerfield. Prentice Hall. Official book for Qt development. Quite complete, but its structure could  be improved. be improved. Status: Qt 4.3, 2008 Foundations of Qt Development Johan Thelin. Apress. More in‐depth and technically oriented explanation of Qt. Most other More in depth and technically oriented explanation of Qt. Most other  books are rather similar to the official documentation that you get for free  with the SDK – this is different, and is therefore a good companion. Status: 2007 28 Andreas Jakl, 2010
  • 29. Even More Information Even More Information Qt for Symbian for Symbian Editors: Frank H. P. Fitzek, Tommi Mikkonen, Tony Torp. For Qt developers wanting to get started with development on the mobile  Symbian platform, or the other way round. Symbian platform, or the other way round. Status: Qt 4.6, March 2010 Online:,, Lots of documentation and examples installed with SDK 29 Andreas Jakl, 2010
  • 30. That’s it. Thanks for your attention. y 30 Andreas Jakl, 2010