== Qt Quick At A Pace - Instructors: Donald Carr == {{{#!irc === ChanServ changed the topic of #ubuntu-classroom to: Welcome to the Ubuntu Classroom - https://wiki.ubuntu.com/Classroom || Support in #ubuntu || Upcoming Schedule: http://is.gd/8rtIi || Questions in #ubuntu-classroom-chat || Event: App Developer Week - Current Session: Qt Quick At A Pace - Instructors: donaldcarr_work [21:00] Logs for this session will be available at http://irclogs.ubuntu.com/2011/09/09/%23ubuntu-classroom.html following the conclusion of the session. [21:02] Good evening [21:02] My name is Donald Carr, I am a PSO engineer with Nokia in Sunnyvale. [21:02] I joined Trolltech in Oslo in 2005, and left for a brief sabbatical as a Qt customer working on a Skypesque client (for 2 years) in New York before relocating to the Bay Area office. [21:03] I work on various embedded targets, track Qt's development across the breadth of the framework and am one of the parents of http://www.qtmediahub.com/ which is one of the largest QML projects I am aware of outside of Intel's tablet (1.2) UX stack. [21:03] I work with many commercial customers who ship embedded Linux based products [21:03] Embedded Linux is almost ubiquitous in embedded devices [21:04] Qt is very strong in the Linux space, and the Webkit/DirectFB acceleration in particular have placed us primely in the STB (Set top box) market [21:04] I am here today to discuss QtQuick [21:04] This is a very laxly structured talk, and we can adjust the content to peoples needs [21:04] basically I have hacked on and around QML a fair amount [21:05] and rather than just showing people trivial examples [21:05] will cover: [21:05] What QtQuick is [21:05] How you can get hacking on it [21:05] How you can use it in your projects or large projects [21:05] Gotchas/strengthes associated with it [21:06] Forgive my shoddy spelling, I am cut and pasting half of the material, live tapping the rest of it [21:06] Feel free to rain questions down on me [21:06] My question queue is empty [21:06] and I feel neglected :) [21:07] I would suspect/hope that people would have questions out of the gate [21:07] I have no clue how big my audience is [21:07] and at what level to pitch my talk [21:07] We can deal with hairy QML issues if you want, feel free to direct questions to me at any point [21:07] I will start with introducing QtQuick to the unitiated [21:07] uninitiated [21:08] QtQuick is an umbrella term used to refer to QML and the associated tooling. QML is a declarative markup language with tight bindings to javascript which enables you to rapidly create animation rich pixmap orientated UIs. [21:08] There has been a fair amount of controversy surrounding QML [21:09] People seem to think it is too focused on mobile devices, and that it is less suitable for desktop usage [21:09] I would contest this, and will hopefully have justified our hard emphasis on the usefulness of this tech by the end of this session [21:10] In order to get you hacking on this, let me step you through getting this on Ubuntu [21:10] qt-sdk is available in the Ubuntu 11.04 repos [21:10] in order to grab it, all you have to do is run [21:10] sudo apt-get install qt-sdk [21:10] (It will pull in all dependencies, if you want just grab Qt Creator and the required subset of packages for Qt development) [21:11] Please be advised, the SDK version shipped with 11.04 is a little long in the tooth at this point [21:11] and you can grab binaries for 32/64bit Linux here http://qt.nokia.com/downloads/ [21:12] Our website will provide you with Qt SDK version 1.1.3 (Qt Creator 2.3.0, Qt 4.7.4) which includes its own updating mechanism and will have infinitely superior QML tooling. [21:12] I was hoping this was going to be an interactive session [21:12] I am one of the parents of: http://gitorious.org/qtmediahub [21:13] This project is an attempt to recreate the look and feel and a subset of the functionality that XBMC provides [21:13] The functionality we provide is basically everything Qt/QML gives us for free [21:13] namely accelerated multimedia playback [21:14] and a heavily pixmap centric layouting engine [21:15] As mentioned, I am heavily involved with aiding people in using Qt in their set top boxes, and demonstrating its performance, readibility and high level accessibility is incredibly valueable [21:15] You can check out the whole project [21:15] or simply browse the QML code here: [21:15] http://gitorious.org/qtmediahub/confluence/trees/master [21:16] This code is for the primary skin [21:16] and I can happily explain/walk you through any points of interest you may have [21:17] teemperor asked: ok, some question, is qml only a language/tool for guis or for whole applications? [21:17] teemperor: There is no theoretical limitation which confines it to gui usage [21:18] teemperor: Any person who starts a QML application will find themselves exposing a great set of Qt functionality to QML in order to use it, so there is certainly merit to dealing with non-gui elements in QML [21:18] teemperor: It is not hard to imagine headless apps written using QML [21:19] teemperor: That said, one of the nicest things about it is the way the bindings allow for relatively layouting [21:19] If you look at XBMC skins [21:19] You will see they are fundementally simple skins with a very limited number of relatively placed items [21:20] They are far less like widget based applications and far more distance friendly [21:20] (10 foot UIs?) [21:21] niemeyer asked: Is there any good path today/in the works to have QML handled by a C program? [21:22] niemeyer: No, there is no straight forward way to do this [21:22] niemeyer: I have no doubt a braver man than me could attempt it an succeed [21:22] niemeyer: I am not that man [21:23] gnomie just mentioned that Unity2D is QML based [21:23] this is true, and it is really clean and small [21:23] The Meego tablet UX is also QML based [21:23] and is the broadest most ambitious of QML I have seen in a public project [21:24] every single application is QML based [21:24] and all launcher via a single engine [21:24] I would love to see more QML applications in the desktop domain [21:25] We tried to craft a compelling demo for CES 2009 using graphicsview [21:25] And we found we were struggling against it every step of the way [21:26] What we produced in a similar timeframe was completely uncomparable to the QML code we managed to churn out and demo [21:26] The Confluence skin I have supplied a link to above is pretty big [21:26] it is also vey ugly, but valuable in that it demonstrates various problems with large QML projects [21:27] and should inspire you to contrain your QML to your own set of criteria [21:27] basically [21:27] the language does not constrain you, and allows you to use global variables and generate spagetthi code [21:27] You have to be aware of this [21:28] from the outset [21:29] and set the appropriate coding conventions at the outset [21:29] if you look at the Delphin skin: [21:29] http://gitorious.org/qtmediahub/delphin/trees/master [21:29] You will see it is infinitely cleaner [21:30] I would urge any of your interested in QML to checkout out and build our project [21:30] as it can get you hacking QML within minutes [21:30] we are more than happy to field questions [21:30] http://www.qtmediahub.com/ [21:30] gives information about the project [21:30] and our respective email addresses [21:30] where you can spam us to your hearts content [21:31] I have to stress that we are pushing QML everywhere [21:32] and experimenting with the extent to which it increases the accessibility of otherwise incredibly complex tasks [21:32] This blog posting: [21:32] http://labs.qt.nokia.com/2011/08/24/qt-quick-3d-tutorial-video/ [21:32] demonstrates the use of QML3D to render and interact with a 3D model of a car using QML [21:33] If you are in the market for more formal training, or curious as to specifics, we have free training material for Qt Quick available here: [21:33] http://qt.nokia.com/learning/online/training/materials/qt-quick-for-designers [21:33] and here: [21:33] http://qt.nokia.com/learning/online/training/materials/qt-essentials-qt-quick-edition [21:35] As you would have gathered ARM based devices are gaining momentum in an increasing array of tasks [21:35] my job involves dabbling with these devices on a daily basis [21:35] Is there any remaining question about what QML is? [21:35] Qt has historically had a painter algorithm paint engine [21:36] a style api based on this, and widgets which render using this [21:36] This resulted in an ungodly mapping of atomic painters algorithm calls resolving to GL calls and massive amount of overhead [21:37] This will be resolved by the scenegraph work going into Qt 5 [21:37] As I mentioned earlier, there has been some public concern that Qt will become less applicable for desktop apps [21:37] Our engineers have already blogged about: [21:37] http://labs.qt.nokia.com/2011/03/10/qml-components-for-desktop/ [21:38] which demonstrates higher level native controls for usage from within QML [21:38] These are still be actively researched and should mature over the coming months [21:39] When QtQuick was first released, it provided very little higher level widget functionality and this caused something of a panic and pigeon holing of the tech as being undesktop like [21:40] This was caused by the lag time in actually implementing and releases Components, which clearly could not be implemented in parallel to the core QML language itself [21:40] We are having a session on this at this years Qt Developer Days (Munich 24-26th Oct, SF 29Nov-1Dec): [21:40] http://qt.nokia.com/qtdevdays2011/qt-technical-sessions#qtquickcomponentsdesktop [21:41] Does anyone have any questions of statements to make at this point [21:41] ? [21:41] If people want to use QML components now [21:42] http://labs.qt.nokia.com/2011/07/06/ready-made-ui-building-blocks-at-your-service-qt-quick-components-for-symbian-and-meego-1-2-harmattan/ [21:42] documents the release of the Symbian component set which have no dependency outside of Qt so you can happily use them outside of Symbian development. (YMMV) [21:43] tomalan asked: gtk-applications tend to have a "foreign" look on OSX. How is that with QT? [21:43] tomalan: I am going to assume you are asking this question in the QML context [21:43] tomalan: Jens provides this screen shot in the comments section: http://labs.qt.nokia.com/wp-content/uploads/2011/03/mac2.png [21:44] tomalan: I would assume the controls would look passably macish, although I clearly can't vouch for them until the surrounding work has matured [21:45] tomalan: I also cant vouch for the feel (even though the look as clearly quite far along) [21:45] tomalan: We are also exposing native theming functionality via other QML constructs [21:45] as documented in this blog: http://labs.qt.nokia.com/2011/04/08/mac-toolbars-for-qt-quick/ [21:46] If you are interested in Qt development [21:46] Please subscribe to the Qt developer mailing lists: [21:46] http://lists.qt.nokia.com/mailman/listinfo [21:46] where flame wars abound [21:46] (but they have to be constructive flamewars) [21:47] If in dabbling with QML you hit any issues please feel free to address questions to: [21:47] Please direct any queries to qt-qml@qt.nokia.com where we can collectively address them. [21:47] If there are no further questions [21:48] I will show you interesting items from Qt Media Hub [21:48] if you do not interject with questions [21:48] the way the project is currently structured [21:48] all models, model population, file system crawling, threading is done in c++ [21:49] the only thing the QML model cares about are structures which are explicitly exposed to it [21:49] this is done in: [21:49] http://gitorious.org/qtmediahub/qtmediahub-core/blobs/master/src/skinruntime.cpp [21:50] starting on line 266 [21:50] You can see we create a property map [21:50] and then attach it to the root context [21:50] There are 10 minutes remaining in the current session. [21:51] this is a clear point where you can see the division of functionality between c++ and QML [21:51] basically, media player skins are completely unconstrained other than the fact they have to use the APIs of these common exported contructs [21:52] So where as XBMC has a fixed XML layout engine [21:52] where the themes are bound to formatting/layout constraints imposed by this intermediate engine [21:53] our QML skins can take any liberties extended by QML [21:53] We currently have around 5 skins [21:53] depending on the targets we are aiming them at: automotive, directfb hardware, GL based devices [21:54] Your QML skin changes depending on the acceleration mechanisms available and the input mechanisms [21:54] One of the trickiest things about QML (it has to be said) is the focus handling [21:55] When using a keyboard to change focus between a hierarchy of controls, especially in a project where multiple people are hacking, we found we had to adopt a procedual way of switching focus between components [21:55] There are 5 minutes remaining in the current session. [21:56] We have 5 minutes remaining, does anyone have any questions? [21:56] I hope some of you managed to grab the qt-sdk package [21:56] and are curious enough to look further into it [21:57] If any of you are interested in joining our project feel free to join us at #qtmediahub [21:58] for QML related questions you can always hop on #qt-qml [21:58] As you would have gathered for Qt 5, QML is the first class citizen, he has the key to the city and hence familiarizing yourself with this technology is very adviseable [21:59] I for one am thoroughly convinced that the new model/architecture of Qt (for Qt 5) makes it very plausable for wide usage in the embedded (and desktop) space [21:59] I think I am about to get booted [21:59] thank you for your time [21:59] I hope that this has been useful [22:00] tomalan asked: When will QT5 be available? [22:00] tomalan: I can't give explicit dates for clear reasons [22:00] Logs for this session will be available at http://irclogs.ubuntu.com/2011/09/09/%23ubuntu-classroom.html [22:00] tomalan: I would expect it to be quite useable by the end of the year}}}