Meego Italian Day 2011 – Andrea Grandi
Upcoming SlideShare
Loading in...5

Like this? Share it with your network


Meego Italian Day 2011 – Andrea Grandi



Meego Italian Day 2011 – Andrea Grandi - Qt: l’infrastruttura di programmazione multipiattaforma. ...

Meego Italian Day 2011 – Andrea Grandi - Qt: l’infrastruttura di programmazione multipiattaforma.

Panoramica di Qt: libreria multipiattaforma per lo sviluppo di programmi con interfaccia grafica tramite l’uso di widget. Perchè usarla? Quali sono i vantaggi? Che linguaggio di programmazione utilizza? E sotto che licenza viene rilasciata? Insomma, tutto quello che abbiamo sempre voluto sapere su Qt, ma non abbiamo mai osato chiedere. Inoltre qualche nozione teorica su Qt Quick e QML.

Andrea Grandi è studente di Informatica presso l’Università di Firenze e ha lavorato per qualche anno come sviluppatore di software. Dal 2007 fa parte della community di Maemo, in cui si impegna attivamente per aiutare i nuovi utenti, organizzare eventi e sviluppare applicazioni; recentemente è stato eletto membro del Maemo Community Council. Ha iniziato da alcuni anni a lavorare con Qt/C++ per creare programmi destinati ai dispositivi Maemo sino ad accumulare un’esperienza tale da essere nominato Nokia Qt Ambassador. Inoltre è socio fondatore del Pistoia Linux User Group.



Total Views
Views on SlideShare
Embed Views



2 Embeds 126 125 1



Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-ShareAlike LicenseCC Attribution-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

Meego Italian Day 2011 – Andrea Grandi Presentation Transcript

  • 1. Andreas JaklSenior Technical ConsultantForum Nokia 08 February, 2011 v3.0.2
  • 2. Distribute: Ovi Store ... and get famous and rich! Design, develop & test Choose development technology Qt, Web, Java Select target platform(s) MeeGo, Symbian, Series 40Choose target market(s) for your appEurope, US, Africa, China, India, etc.
  • 3. Java apps Native apps (Qt) Web Apps Web Apps
  • 4. Native appsUse operating system and its functions directly (different code for networking, GPS, etc.) Operating System Symbian, MeeGo, Windows, Mac OS, Linux
  • 5. (if needed, direct access is still possible) Your App Qt framework Same code works on all platforms, covers many usecases (GPS, etc.) Operating SystemSymbian, MeeGo, Windows, Mac OS, Linux
  • 6. Using Qt SDK for – Dev. environment – Testing – Translation Publish to – Help – Ovi Store (Symbian, MeeGo)Developer App Source Code – Windows – Linux Using Qt framework for – Mac – User Interface – Embedded – Networking – Location (GPS) – Web integration – ...
  • 7. • Cross-Platform • Mobile focus – Same source code for multiple platforms – Location, Maps – Maximum performance – native apps! – Sensors• Generic – Messaging (SMS, email) – User Interface – Contacts, Calendar – Declarative UI, animation, gestures, – Camera multi-touch, 3D (OpenGL) – System information – WebKit & JavaScript engine included – Haptics (vibration) – Multimedia (audio, video) • Extend – Networking, XML – Include any 3rd party C++ library / code – SQL, files, app settings – Container classes, object communication, 23 modules, threading, unit testing ~ 800 classes, ~ 9000 functions
  • 8. 4 million DL / day 190+ countries Discussion boards, One-time fee of €1. 103x operator billing e-learning videos, Submit an unlimited number of apps. examplesSDK, toolchain,remote device testing,etc.
  • 9. Open Source Qt can be used in commercial, closed-source appsChanges to Qt source must be shared Tech support available Included support
  • 10. Nokia E71 Nokia N8 (S60 3.1, 2008) (Symbian^3, 2010) • Qt for Symbian: – Works on S60 3.1+ (E71, E72, 5800, N97, N8, etc.) * – Look up platform versions: Qt Compatibility Qt Pre-Installed* Qt can be installed on all compatible devices. Not all devices are enabled for Qt content in the Ovi Store. Current list of Ovi Store device deployment support for Qt apps:
  • 11. • Open Source Linux for Mobile Computers – Based on Maemo and MobLin – Developed by Nokia and Intel – Hosted by the Linux Foundation –
  • 12. • Qt is the same on all platforms, but: – New UI concepts for mobile devices • Touch screen, limited screen space – Be careful • Network speed, roaming, battery – More possibilities • GPS, accelerometer, compass, haptics, multitouch• Platform-specific knowledge – Mainly hidden – A few concepts shine through • Security system (Symbian: capabilities, signing) • Need to use native operating system APIs when Qt doesn’t provide the functionality
  • 13. • You‘ll love Qt! – Easier setup • 1-click installation (Qt SDK) – Hides complexity • No descriptors, cleanup stack, two-phase construction, active objects – Less code, more efficiency Nokia 7650 (2001) Nokia’s first Symbian phone – Expand the reach • Deploy your app not only to Symbian, but also to MeeGo and other platforms
  • 14. • Expand your reach – Reach different market segment – Nokia: 30.8% global market share (Q4 2010, IDC)• Porting – Web: supported with all manufacturers – Native apps: different programming languages• Porting Guidelines –
  • 15. • Keep your assets – Reuse images, sound & music• Screen resolution iPhone <= 3 480 x 320 3:2 iPhone 4 960 x 640 3:2 Nexus S 800 x 480 5:3 Symbian^1 & 3 Samsung Galaxy S 800 x 480 5:3 640 x 360 16:9 aspect ratio Nokia N900 800 x 480 5:3
  • 16. Engine: WebKit (latest version,great HTML 5 support)Dev. environment: Qt SDK - Storage of content on the device (HTML, CSS, JavaScript, Images) - Menu iconEngine: WebKit (earlier version, - Access to device featuressame as phone browser)Dev. environment: Aptana Studio / Nokia Web SDK
  • 17. Rewriting your source code is always required Java (parts in C++ possible) Native OpenGL ES 2.0 is Eclipse supported on all platforms, but steep learning curve and more effort! C++ Qt SDKObjective CXcode
  • 18. • Qt SDK 1.1 Maemo – One-click installation • IDE, toolchain, documentation, examples Desktop Simulator – Tech Preview out now: Qt SDK works on Windows, Linux, 1-1-technology-preview-released/ Mac MeeGo Symbian (soon)
  • 19. • Efficient Testing – Quick launch – Scripting possibilities • Using JavaScript – Simulate mobile environments • Location, contacts, etc. – Simulate phone events • Battery, messages, etc. – Skins for different platforms / form-factors • Resolutions, orientation, etc.
  • 20. • Widgets (QLabel, QPushButton, etc.) – Use platform UI design – Support style sheets – Drag & drop UI designer Great for desktop. Static layouts make effects difficult. Small UI, different interaction paradigms.
  • 21. • Qt Quick – QML language and JavaScript – Declarative syntax, animations and states integrated – Drag & drop UI designer Very easy to make slick, fluid UIs. Most important for mobile devices! Ready-made UI components on their way ** Project page:
  • 22. Desktop App Mobile App GameWidgetsQt QuickOpenGLWeb
  • 23. ~ 300 lines of code, #include <QApplication> import Qt 4.7~ 15 files #include <QPushLabel> Rectangle { int main(int argc, char *argv[]) width: 360 { height: 360 QApplication app(argc, argv); QLabel helloLabel("Hello World"); Text { helloLabel.setAlignment(Qt::AlignCenter); anchors.centerIn: parent helloLabel.showMaximized(); text: "Hello World" } return app.exec(); } }
  • 24. • Most cross-platform – Design and create any custom user interface – Same resolution: pixel precise on desktop, Symbian and MeeGo Windows 7 Simulator Maemo / MeeGo Symbian^3
  • 25. import Qt 4.7 Rectangle {• Describe UI by tree structure of width: 200 height: 200 property bindings Image { – Properties dynamically source: "QtLogo.png" anchors.centerIn: parent evaluated } – Communication through } signals & slots – Bindings to C++ code possible – Animate properties using states and transitions
  • 26. import Qt 4.7 Rectangle { width: 200• Interactivity height: 200 – Interact with Image { source: "QtLogo.png" mouse / touch anchors.centerIn: parent – Execute JavaScript in signal } MouseArea { handlers anchors.fill: parent onClicked: parent.color = "green" } }
  • 27. import Qt 4.7 Rectangle { width: 200• Dynamic property update height: 200 – Move image with mouse Image { source: "QtLogo.png" x: myMouse.mouseX y: myMouse.mouseY } MouseArea { id: myMouse hoverEnabled: true anchors.fill: parent onClicked: parent.color = "green" } }
  • 28. Viewer on PC & mobile: Qt C++ app to load and show QMLTesting 100% pure QML directly Can include C++ for app logicE.g., created by Flowella
  • 29. • Simplify building rich UIs with Qt Quick – Provides widgets for Qt Quick – title bar, actions, list items, buttons, etc. – Styles to integrate with native look & feel• More Info – Open source, in development – General info: the-future-reintroducing-the-qt-quick- components/
  • 30. Mobility 1.1 – develop now,Mobility 1.0 – use now deploy to Ovi Store end of Q1 2011Bearer Management API CameraContacts Document GalleryLocation FeedbackMessaging LandmarksMultimedia Maps/NavigationPublish and Subscribe OrganizerService Framework Service Framework – Out of processSensorsSystem InformationVersit
  • 31. Qt Install App (& SI) Required Qt version not already installed? Download and install Qt
  • 32. * Qt apps are native apps; therefore, the security model of the target operating system applies.1. Determine the required security / privacy related features – Most common: (See: ) Feature Capability Internet access, telephony, messaging NetworkServices Access location (GPS, etc.) Location Camera, record audio UserEnvironment Contacts, Calendar ReadUserData / WriteUserData Bluetooth LocalServices IMEI, model name, battery status ReadDeviceData2. Define the capabilities in the Qt project file (.pro) symbian:TARGET.CAPABILITY += Location ReadUserData
  • 33. 3. Get the right certificate during development
  • 34. 4. PublishNeed Certified Signed capabilities?> Purchase a Publisher ID ($200 / year)Submit to Certified Signed process @
  • 35. Windows Symbian MeeGo Mac OS Linux N900 Tech Preview: out now* Remember: Qt 4.6 apps (= w/o Qt Quick) supported on the Ovi Store for Symbian since summer 2010!
  • 36. Symbian^3 Symbian^1S60 3.1 S60 3.2 S60 5.0
  • 37. • Qt SDK – Help, examples• Discussion boards, wikis – Forum Nokia: – Qt Developer Network:• e-Learning materials – –• Community –
  • 38. Beginning Nokia Apps Development Ray Rischpater, Daniel Zucker. Apress. Complete end-to-end story of developing for Symbian and MeeGo with Qt (Quick) and HTML 5. Status: Qt 4.7, December 2010 Foundations of Qt Development Johan Thelin. Apress. More in-depth and technically oriented explanation of Qt – different approach to many other books. Generic Qt, no mobile. Status: 2007C++ GUI Programming with Qt 4 (2nd edition)Jasmin Blanchette, Mark Summerfield. Prentice Hall.Official book for generic Qt development (no mobile). Good for looking things up or for enhancing yourknowledge, average for learning from scratch.Status: Qt 4.3, 2008
  • 39. • Official accreditation for individual developers – Confirms your development skills in Qt – Become more attractive in the job market! – Qt Essentials exam: 50 multiple choice questions, 60 minutes – Coming soon: Qt Advanced exams (widgets and C++)
  • 40. • Active community member? – Be even more involved, improve your network and get rewarded! – Forum Nokia Champion – Qt Ambassador
  • 41. • Qt is a good way to teach software development – Instant results to motivate attendees – Graphical tools make entry easier – Flexible system, extensible with own libraries – … and still standard C++!• University support – Free Qt course materials under Creative Commons (PPT and OpenOffice) – Forum Nokia University support
  • 42. • Not happy with the way something works? Found a bug? – Submit your Qt bug report or suggestion to: – Unsure about what to include? The guide is here: – Found a bug somewhere outside of Qt? Report it here: – Also go to the above URL to buy a commercial support ticket if needed!
  • 43. Want to learn more? JaklSenior Technical ConsultantForum Nokia