SlideShare ist ein Scribd-Unternehmen logo
1 von 24
Qt Quick A deep dive...
Agenda Introduction Opportunities Meet QML Tooling support Language basics Engine Details Integrating Native Components (e.g. Plasma)
About Me Qt Developer since 2008, based in Oslo Mainly work on QGraphicsView and Widgets Involved in QML development Recently moved to QtWebKit/WebKit development Started KDE development in 2006 with KPlato Plasma developer since 2007
French Fast Food
Norwegian Gastronomy
Qt Background & Opportunities in UI development
Qt Background & Opportunities in UI development
Qt Background & Opportunities in UI development Qt comes from the desktop world Initially designed to solve building a UI on Motif + Windows 15 years ago Component-based architecture not truly cross-platform Doesn’t fit with differentiated UI’s Collaborating with Designers can be difficult Designers speak a different language, use other tools Imperative languages can be counter-productive steps to reach a desired result - contrary to expressing what L&F directly Canvas-based architectures becoming prevalent Animations, fluid Transformations, resolution more UI differentiation Hardware capabilities converging, UI form-factors diverging
Meet QML Qt Quick is an umbrella term for QtDeclarative, QML and Creator QML = Qt Meta-Object Language A new way to create Qt UI’s Declarative Language (JavaScript inspired) Supports JavaScript Intuitive and Fun to use! Similar structure to HTML (but it’s not the same!) Components are created from smaller order / simpler elements Build your own button Each item is independently accessible QGraphicsView (canvas) base Supports States and Animated Transitions Configurations of properties, and interpolating between them
Why Qt Quick? Ease the creation of animated user interface Bridge the gap in Qt for mobile development Focus on performance All platforms : desktop and embedded More productivity Bring designers and developers together Empower designers to create real apps
Tooling support “qmlviewer” allows loading a .qml file and loads plugins for extending semantics dynamically Qt Creator with great QML support Project Wizard Syntax Highlighting Error checking Help lookup Code completion and snippets WYSIWYG graphical editor And meanwhile, in research...
Demo!
QML Language Basics Declarative! Direct and Expressive language No construction detour (Tool and Quick Designer in perfect sync) Very simple and intuitive Uses signals and slots, properties Fun to use! JavaScript inspired Tap into existing knowledge Built on top of C++ All QML elements are implemented in Qt using C++ QML can very easily be customized and extended from C++ without NPAPI intricacies
States and Transitions A state is another name for specific property values in a set of item A transition combines two states, from and to An animation is how the property values is smoothly changed from the first to second state PropertyAnimation key to other Animation types; ColorAnimation, NumberAnimation Sequential- and ParallelAnimation can be used to control ordering Actions allow direct changes during animation Follow enables tracking values
Demo!
QML is Web-enabled SVG support PNG, JPEG, etc JavaScript functionality using JavaScriptCore XmlHttpRequest for AJAX-functionality <div id=…> functionality ( Item { id:… } QML allows parent and children[] accessors similar to CSS QML items can anchor/chain edges to other items’ anchor lines Synchronous API of the HTML5 Web Database API
QML Elements
QML Engine Details QML is Description of an object tree with properties Property bindings QMLEngine features Script execution (JavaScriptCore) Network access (HTTP, URI’s, XmlHttpRequest, etc) Import control for custom libraries Debugging tooling Property inspector, framerate tracing, console output to name a few… Parser interface Key classes QDeclarativeEngine QDeclarativeComponent QObject
C++ Bindings Exposing your C++ to QML QObjects, !abstract, default constructor Exposing C++ instance to QML Context are key to correct behavior determines scope resolution of variables and script execution QML is Easy to integrate into existing Qt UI code QML_DECLARE_TYPE ()int qmlRegisterType ( const char * uri, int versionMajor, int versionMinor, const char * qmlName ) QDeclarativeView view; QDeclarativeContext *context = view.rootContext(); context->setContextProperty("backgroundColor", QColor(Qt::yellow));
Demo!
Plasma and QML All Plasma widgets are available in QML Like any QGraphicsWidget You can connect to Plasma::DataEngines from QML to get data Theming support You can create applets in QML,  package it and share it on kde-apps.org
Demo!
What's coming next? Multitouch More Qt Mobility APIs accessible trough QML Qt Components Bringing more advanced elements in QML (PushButton, CheckBox, Slider...) Qt/3D with QML Vahalla for performance improvements
Questions? Want to contribute and get involved in QML? IRC chat on #qt-qml on irc.freenode.net Sign up for out qt-qml email list at lists.trolltech.com/mailman/listinfo/qt-qml Want to contribute and get involved in Plasma? plasma-devel@kde.org #plasma on freenode Code : /playground/base/plasma/shells/mobile/ Alexis Menard : menard@kde.org, alexis.menard@nokia.com

Weitere ähnliche Inhalte

Andere mochten auch

Andere mochten auch (7)

Karttapohjainen liiketoimintatiedon hallinta ja analysointi
Karttapohjainen liiketoimintatiedon hallinta ja analysointiKarttapohjainen liiketoimintatiedon hallinta ja analysointi
Karttapohjainen liiketoimintatiedon hallinta ja analysointi
 
KDE in Your Life from Desktop to Pocket
KDE in Your Life from Desktop to PocketKDE in Your Life from Desktop to Pocket
KDE in Your Life from Desktop to Pocket
 
Multi View Constructed Right
Multi View Constructed RightMulti View Constructed Right
Multi View Constructed Right
 
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
KDE Plasma Mobile workspaces at Cybercom Developer Day 2010 by Marco Martin 7...
 
KDE Plasma for Mobile Phones
KDE Plasma for Mobile PhonesKDE Plasma for Mobile Phones
KDE Plasma for Mobile Phones
 
Study: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving CarsStudy: The Future of VR, AR and Self-Driving Cars
Study: The Future of VR, AR and Self-Driving Cars
 
Hype vs. Reality: The AI Explainer
Hype vs. Reality: The AI ExplainerHype vs. Reality: The AI Explainer
Hype vs. Reality: The AI Explainer
 

Ähnlich wie Qt quick at Cybercom Developer Day 2010 by Alexis Menard 7.9.2010

Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011
Johan Thelin
 
Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13
Daker Fernandes
 

Ähnlich wie Qt quick at Cybercom Developer Day 2010 by Alexis Menard 7.9.2010 (20)

Qt Technical Presentation
Qt Technical PresentationQt Technical Presentation
Qt Technical Presentation
 
Qt for S60
Qt for S60Qt for S60
Qt for S60
 
Qt S60 Technical Presentation Fn Stripped
Qt S60 Technical Presentation Fn StrippedQt S60 Technical Presentation Fn Stripped
Qt S60 Technical Presentation Fn Stripped
 
Qt
QtQt
Qt
 
Intro to QML / Declarative UI
Intro to QML / Declarative UIIntro to QML / Declarative UI
Intro to QML / Declarative UI
 
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
 
Epam mobile meetup 2014 10-15 qt cross-platform solution for mobile development
Epam mobile meetup 2014 10-15 qt cross-platform solution for mobile developmentEpam mobile meetup 2014 10-15 qt cross-platform solution for mobile development
Epam mobile meetup 2014 10-15 qt cross-platform solution for mobile development
 
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
 
Building Cross-Platform Apps using Qt and Qyoto
Building Cross-Platform Apps using Qt and QyotoBuilding Cross-Platform Apps using Qt and Qyoto
Building Cross-Platform Apps using Qt and Qyoto
 
Qtframework
QtframeworkQtframework
Qtframework
 
TopMod3d - Texas Open Source Symposium
TopMod3d - Texas Open Source SymposiumTopMod3d - Texas Open Source Symposium
TopMod3d - Texas Open Source Symposium
 
Next Generation Hybrid Applications with Qt - presentation for SEE 2009
Next Generation Hybrid Applications with Qt - presentation for SEE 2009Next Generation Hybrid Applications with Qt - presentation for SEE 2009
Next Generation Hybrid Applications with Qt - presentation for SEE 2009
 
Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011Necessitas - Qt on Android - from FSCONS 2011
Necessitas - Qt on Android - from FSCONS 2011
 
Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13Plasmaquick Workshop - FISL 13
Plasmaquick Workshop - FISL 13
 
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
 
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with XgxperfDeveloping and Benchmarking Qt applications on Hawkboard with Xgxperf
Developing and Benchmarking Qt applications on Hawkboard with Xgxperf
 
Qt Creator, l'arma segreta!
Qt Creator, l'arma segreta!Qt Creator, l'arma segreta!
Qt Creator, l'arma segreta!
 
Qt for beginners part 1 overview and key concepts
Qt for beginners part 1   overview and key conceptsQt for beginners part 1   overview and key concepts
Qt for beginners part 1 overview and key concepts
 
Kotlin native for iOS and Android
Kotlin native for iOS and AndroidKotlin native for iOS and Android
Kotlin native for iOS and Android
 
What is Kotlin Multiplaform? Why & How?
What is Kotlin Multiplaform? Why & How? What is Kotlin Multiplaform? Why & How?
What is Kotlin Multiplaform? Why & How?
 

Qt quick at Cybercom Developer Day 2010 by Alexis Menard 7.9.2010

  • 1. Qt Quick A deep dive...
  • 2. Agenda Introduction Opportunities Meet QML Tooling support Language basics Engine Details Integrating Native Components (e.g. Plasma)
  • 3. About Me Qt Developer since 2008, based in Oslo Mainly work on QGraphicsView and Widgets Involved in QML development Recently moved to QtWebKit/WebKit development Started KDE development in 2006 with KPlato Plasma developer since 2007
  • 6. Qt Background & Opportunities in UI development
  • 7. Qt Background & Opportunities in UI development
  • 8. Qt Background & Opportunities in UI development Qt comes from the desktop world Initially designed to solve building a UI on Motif + Windows 15 years ago Component-based architecture not truly cross-platform Doesn’t fit with differentiated UI’s Collaborating with Designers can be difficult Designers speak a different language, use other tools Imperative languages can be counter-productive steps to reach a desired result - contrary to expressing what L&F directly Canvas-based architectures becoming prevalent Animations, fluid Transformations, resolution more UI differentiation Hardware capabilities converging, UI form-factors diverging
  • 9. Meet QML Qt Quick is an umbrella term for QtDeclarative, QML and Creator QML = Qt Meta-Object Language A new way to create Qt UI’s Declarative Language (JavaScript inspired) Supports JavaScript Intuitive and Fun to use! Similar structure to HTML (but it’s not the same!) Components are created from smaller order / simpler elements Build your own button Each item is independently accessible QGraphicsView (canvas) base Supports States and Animated Transitions Configurations of properties, and interpolating between them
  • 10. Why Qt Quick? Ease the creation of animated user interface Bridge the gap in Qt for mobile development Focus on performance All platforms : desktop and embedded More productivity Bring designers and developers together Empower designers to create real apps
  • 11. Tooling support “qmlviewer” allows loading a .qml file and loads plugins for extending semantics dynamically Qt Creator with great QML support Project Wizard Syntax Highlighting Error checking Help lookup Code completion and snippets WYSIWYG graphical editor And meanwhile, in research...
  • 12. Demo!
  • 13. QML Language Basics Declarative! Direct and Expressive language No construction detour (Tool and Quick Designer in perfect sync) Very simple and intuitive Uses signals and slots, properties Fun to use! JavaScript inspired Tap into existing knowledge Built on top of C++ All QML elements are implemented in Qt using C++ QML can very easily be customized and extended from C++ without NPAPI intricacies
  • 14. States and Transitions A state is another name for specific property values in a set of item A transition combines two states, from and to An animation is how the property values is smoothly changed from the first to second state PropertyAnimation key to other Animation types; ColorAnimation, NumberAnimation Sequential- and ParallelAnimation can be used to control ordering Actions allow direct changes during animation Follow enables tracking values
  • 15. Demo!
  • 16. QML is Web-enabled SVG support PNG, JPEG, etc JavaScript functionality using JavaScriptCore XmlHttpRequest for AJAX-functionality <div id=…> functionality ( Item { id:… } QML allows parent and children[] accessors similar to CSS QML items can anchor/chain edges to other items’ anchor lines Synchronous API of the HTML5 Web Database API
  • 18. QML Engine Details QML is Description of an object tree with properties Property bindings QMLEngine features Script execution (JavaScriptCore) Network access (HTTP, URI’s, XmlHttpRequest, etc) Import control for custom libraries Debugging tooling Property inspector, framerate tracing, console output to name a few… Parser interface Key classes QDeclarativeEngine QDeclarativeComponent QObject
  • 19. C++ Bindings Exposing your C++ to QML QObjects, !abstract, default constructor Exposing C++ instance to QML Context are key to correct behavior determines scope resolution of variables and script execution QML is Easy to integrate into existing Qt UI code QML_DECLARE_TYPE ()int qmlRegisterType ( const char * uri, int versionMajor, int versionMinor, const char * qmlName ) QDeclarativeView view; QDeclarativeContext *context = view.rootContext(); context->setContextProperty("backgroundColor", QColor(Qt::yellow));
  • 20. Demo!
  • 21. Plasma and QML All Plasma widgets are available in QML Like any QGraphicsWidget You can connect to Plasma::DataEngines from QML to get data Theming support You can create applets in QML, package it and share it on kde-apps.org
  • 22. Demo!
  • 23. What's coming next? Multitouch More Qt Mobility APIs accessible trough QML Qt Components Bringing more advanced elements in QML (PushButton, CheckBox, Slider...) Qt/3D with QML Vahalla for performance improvements
  • 24. Questions? Want to contribute and get involved in QML? IRC chat on #qt-qml on irc.freenode.net Sign up for out qt-qml email list at lists.trolltech.com/mailman/listinfo/qt-qml Want to contribute and get involved in Plasma? plasma-devel@kde.org #plasma on freenode Code : /playground/base/plasma/shells/mobile/ Alexis Menard : menard@kde.org, alexis.menard@nokia.com