Sat 12.08.12 – Here are my notes from the Qt Developer Days 2012 conference in Santa Clara, Calif. Per my usual, the notes are a running transcription and paraphrase of the speaker’s slides and spoken words plus my own opinions on the session. Official session slides and videos will be up at the conf website soon.
Once again, I am very glad that I went to the Qt Developer Days and was very encouraged by Digia’s commitment to continuing Qt development as well as the strong community support for not just the desktop and embedded linux sides of Qt but also Mobile. It was very good to see the Jolla Mobile, BlackBerry’s Cascades, and Mer Project mobile Qt presentations, as well as the ongoing strength of the open source, community contributed Qt Project.
Go Qt, Go!
*************
Qt Developer Days 2012
Santa Clara Marriott
Thurs 12/6/12
9am – noon
Keynotes
I tweeted the keynotes, didn’t take notes. Here are my tweets:
“One framework to rule them all – Qt” – Tommi Laitinen, @digia. #QtDD12 (I want to know who gets to be the elves?)
— Jenifer Hanen (@msjen) December 6, 2012
#QtDD12 Lars Knoll now on stage announcing the release today of #qt5 rc
— Jenifer Hanen (@msjen) December 6, 2012
flic.kr/p/dz5irJ – #QtDD12 keynote with Tommi Laitinen of @digia
— Jenifer Hanen (@msjen) December 6, 2012
#QtDD12 @larsknoll excited by how the @qtproject has evolved in the last year with 25,000 commits. The community pushed Qt Project forward.
— Jenifer Hanen (@msjen) December 6, 2012
#Qt5 is compatible with Qt4. Widgets fully supported. Modular architecture: only include the modules you need. – @larsknoll #QtDD12
— Jenifer Hanen (@msjen) December 6, 2012
#QtDD12 @larsknoll said Qt5 will be released before the end of the year 2012. In 2013 there will be 2 releases plus Android.
— Jenifer Hanen (@msjen) December 6, 2012
#QtDD12 @larsknoll expects beta Qt Android by summer and full Tier 1 by the autumn. Alpha iOS by summer, a few dev challenges before beta.
— Jenifer Hanen (@msjen) December 6, 2012
#QtDD12 @larsknoll Winows 8 under investigation for 2013. Also for 2013, device tooling for embedded & Qt Quick components for desktop/embed
— Jenifer Hanen (@msjen) December 6, 2012
#QtDD12 @larsknoll says the future looks bright and he is excited.I am, too. #Qt5
— Jenifer Hanen (@msjen) December 6, 2012
#QtDD2012 Blackberry’s Alec Saunders talks about how to live above the App Dev poverty line by developing for BB. @ashnazir demos #BB10
— Jenifer Hanen (@msjen) December 6, 2012
flic.kr/p/dz1ddV – #QtDD12 @ashnazir demoing Blacberry 10 #BB10
— Jenifer Hanen (@msjen) December 6, 2012
**********
1:15pm
Best Practices for Developing with Qt Quick
Justin Noel
Justin starts by asking if anyone has written a Qt Quick app – only a few of us, then how many have written a Qt Widget app – all the rest. So he is starting out with beginning best practices.
text: qsTr(“hello”)
qsTr opens text up to be translated
relative image urls
JN is now talking about organizing code.
Set a minimal size.
Have a dependency to make code reusable. Ex. property QtOject dataObj text: dataObj.name dataObj: InterestingThing
Conditionals
source: mouseArea.pressed ? “pressedButton.png” : “button.png”
Keep widgets encapsulated
Don’t access items directly through ID
Mr. Noel emphatically said that C++ should be used for all business logic. I don’t agree. Javascript and Qt Declarative can do most of the lifting. He is advocating separation of front and back end with Qt Quick/QML only for the pretty and moving (twice made statement doing this to keep the designers from ruining your code). I once again disagree.
Mr. Noel’s emphatic his-way-or-the-highway presenting style is reminding me why I really disliked the one ICS training I attended. I realize that ICS’s training style is for C++ programmers who are getting into QML, but the “QML Best Practices” session would be better served to be a panel with at least 3 prominent voices in the Qt Quick / QML developing and training worlds to represent a much wider variety of people who are using QML.
**********
2:30
Why you should be excited about Qt5
Thiago Macieira
Who am I?
Open Source developer for 15 years
Software Architect at Intel’s Open Source Technology Center (OTC) in Portland, Oregon
01.org – OTC website
Maintainer of two modules in the Qt Project : QtCore and QtDBus
We’ve come a long way
1996 Qt 1.0 (9/24/96)
1999 Qt 2.0 (6/25/99)
2001 Qt 3.0 (10/15/01)
2005 Qt 4.0 (6/27/05)
Qt 5.0 RC1 released today
Get it while it’s fresh!
http://qt-project.org/downloads
What is Qt 5?
Goals:
Works for everyone – desktop, embedded, mobile
New features – I want you to want this Qt5, that you will think Qt4 is too old.
(Create) State of the art UIs
Increased modularity
Reduced footprint
Compatible with Qt 4.x
What is new in Qt 5.0?
Qt Quick 2
New graphics stack – OpenGL model
New modular structure
All platforms based on QPA
New features:
Performance improvements
OpenGL w/ ANGLE support
Wayland support
JSON support
Mimetype support
QStandardPaths
XCB instead of Xlib
QRegularExpression based on PCRE
etc
New features: C++11 support
Certain new functionality only in C++11
Inline UTF-16 support for QString
New signal/slot syntax
Performance
Qt continues to support C++98 (for now)
New features: new signal/slot connection syntax
Compire time checking of
Existence of the signal and hte slot
Argument compatibility
Works best with C++11
Advantages
Proper namespace and typedef support
Automatic type promotion and demotion
long -> int const char * -> QByteArray or QString
QObject::connect(s, &SenderObject::signal1, r1, &ReceiverObject::slot1);
QObject::connect(s, &SenderObject::signal1, [=]() { s->dumObjectInfo(); });
UIs: new style for desktops
New Modern style, called Fusion
Replaces previous styles
Motif, Plastique, Cleanlooks
Still available in a separate module
UIs: QML in the spotlight
QML is our best in the next step in GUI programming
Easier interaction with designers
Easier to modify, update, maintain
Implementations:
Qt Quick 1
Qt Quick 2
Cascades
Desktop Components
UIs: Qt Quick 2 and OpenGL (ES)
Qt5 supports two rendering paradigms
Software rasterizer/QPainter: used by QWidgets
OpenGL (ES): used by Qt Quick 2
QPainter
Optimized for many years
Qt Quick 2 is built and optimzed for OpenGL
Even SW rasterization can give great performance
Modularity: Structure of Qt 5
Reference platforms
Linux (X11 and Wayland)
Mac OS X
Windows
Other supported platforms
QNX, DirectFB
Android, iOs being worked on
Modularity: Tiers
Tier 1
Tested all the time, esp at release time
Team behind it is committed to supporting it
Tier 2
Tested at release, but not all fixes in
May raise in the future
Tier 3
Code is present, but support level is unknown
Modularity: Qt Essentials
Always Available
Qt Core
Qt Network
Qt Gui
Qt Widgets (for desktops only)
Qt WebKit
Qt Multimedia
Qt Sql
Qt Quick 1 and 2
Modularity: Add-on modules
For specific contexts:
(many, many)
Modulartiy: why add-ons?
Simpler to maintain for us
Different release schedules
Quicker to QA and test
Simpler for new projects to be added
Footprint: Lean and mean QtGui
Widget classes moved to a separate module (QtWidgets)
….
Migrating from Qt4 to Qt5
Compatible with Qt4 with very few exceptions
Qt Widgets are supported in Qt5
Doesn’t require migration to Qt Quick
….
Current state
We are in the final mile!
Final by the end of the year (hopefully)
After 5.0: Releases
Hybrid time /quality based release schedule
2 feature releases per year
After 5.0: Embedded systems
Recover time lost
Cooperate with vendors and embedded Linux distros
Investigate Android on embedded
tool support
After 5.0: More platforms
Definite support for Blackberry and QNX
Investigating support to Windows 8 & RT, iOS, Android
After 5.0: Others
Full desktop support in Qt Quick
Integrated Software OpenGL renderer
Continue to evolve the WebKit2 based Qt WebKit
More processor architectures for JavaScript
Improvement on the V4 engine
**********
4pm
Desktop Components for Qt Quick
Jens Bache-Wiig, Digia
Jens is live coding and doing demos of code he has created rather than using a slide deck.
He is showing us how to do a Spotify desktop app using QML
“I wrote this API, but I keep changing it. I don’t know why it stopped working, it is super inconvenient.” – JBW
Row is inflexible, so we have added Layout.
[import QSpotify 1.0 as Spotify at top; then insustantiate with > property var spotify: Spotify.spotify; Component.onCompleted: ]
sopitify.isPlaying ? “pause.png” : “play.png”
onClicked: spotify.isPlaying ? spotify.pause() : spotify.resume()
Image {
id: albumImage
anchors.bottom: parent.bottom
width: parent.width // image resizes
height: parent.height
asychronus: true // loads in background
source: spotify.albumSource
}
Bravo to Jens Bache-Wiig as he just said he wants his app to look good. “I am a bit of a pixel perfectionist.”
Jens is also javascript positive.
I wish the Qt Quick Best Practices session this morning was a panel of different voices as Jens Bache-Wiig would have been a great foil to Justin Noel’s opinions.
**********
5:15pm
Jolla Developer Story
Vesa-Matti Hartikainen
@veskuh
“We develop Sailfish OS together with alliance, friends and community, license the OS and make our own Jolla devices.” – Jolla
David Greaves is going to tell us about the Mer Core. David shows us how the Sailfish SDK uses the Qt Creator.
Sailfish SDK is a virtual machine running alongside the Qt Creator on your machine.
Sailfish SDK
will be used for dev apps to Jolla devices
Qt Creator IDE
Complete target sf OS environment
Linux, Windows, and Mac OS X
Features
compile, package, deploy to device or virtual machine
Management capabilities are built in; Upgrades, New Targets, …..
Sailfish is based on Mer
Sailfish utilizes parts of ….
Programming interfaces
Main APIs for application developers
Qt 4.8
Qt Mob 1.2
Qt Webit 2.2
Jolla Qt Quick components
Linux platform APIs are also available and can be used with a good reason
Jolla Components
Vesa-Matti gives a demo of a few Jolla components and UI touch & tap gestures
Porting N9 apps to Jolla
Main diff compared to MeeGo 1.2 Harmattan
MeeGo touch framework is not supported
Qt version is newer in Jolla
Jolla Qt Quick component set instead of meego components
Different UI style
RPM packaging
Live coding demo – Porting a Nokia Harmattan N9 app to Jolla
“In my case, I am addicted to RSS, so I wanted to have an RSS client in Jolla as soon as possible.” – Vesa-Matti Hartikainen
Porting a simple mobile Qt Quick app to Jolla
Changes to com use
Jolla specific features
Active covers
Pulley menus
Colors from Ambiance
Questions?
**********
Day 2
Qt Developer Days 2012
Santa Clara Marriott
Writing Complex Applications with QML
Aaron Seigo, KDE
aseigo@kde.org
Discipline
Cleanliness and consistency
Study the API. All of it.
Separate items – don’t have one or two big qml files
QML is about “Presentation, not business logic” – brings up questions of when to use javascript and when to use C++
Tricks of the trade
Geometry – We set the geometry at the place where the item gets substantiated
Loaders – A loader says, “I would like something now.” Shows example of conditional loader
Centralize and share visual elements – Aaron is using a theme item to call and scale
Components – will extend what your QML app can do using the same code, components encourages design thinking (“What is the public API?”, etc)
Packages
C++
Whither C++?
How do you extend QML to talk to the system?
We wrap things in libraries and expose it to QML – models give us access to difficult services.
Also can use QObject wrappers – make sure every property has a reader & a writer – change signal.
Adapt or die
It is no longer good enough to target one kind of device, we live in a world of many devices and sizes.
Uses a ‘platformcontents’ js to determine if touch or desktop to determine size and scale of buttons and active areas. Can also switch according to device.
Missing pieces
QML is a fairly new technology and it can’t do everything
QML is extensible
As a community, we can fill in the gaps with components and community add-ons
QML 2 is looking very good.
**********
Qt Quick Tools – To Help you Code Faster and Better
Aurindam Jana, Digia
Aurindam.Jana@Digia.com
Overview of existing tools —> Get feedback and feature requests
Coding
QML/JS Editor
Qt Quick Designer
Debugging
QML Debugging
Inspector
Console APIs
Profiling
QML Profiler
Qt Creator 2.6.1
Qt Quick 1 & 2
Why use QML/JS Editor
Code faster
Reduce errors
Maintain Code
Easy to read
Does demo of QML Editor
Code: Qt Quick Designer
Code faster
Quick Prototype
Easy to use
Debugging: Overview
Device to developer machine debugging -> shows the sausage making of TCP debugging and ports et al
If this is too complicated?
Just press the debugging button in Qt Creator.
Debugging Inspector
Profiling
Re-uses debugging client server architecture
To profile a running app that has QML debugging enabled, specify the host and port.
In Qt5 there is a standalone profiler
**********
Mer & Qt
David Greaves, Mer & Jolla
Mer – vendor oriented
[late to the session]
David demo’d the Mer SDK and tools which is a virtual machine using Qt Creator
Platform SDK builds every part of Mer
SDK Roadmap
… getting started
1 to 2 engineer, hardware adaptation, graphics adaptation, platform sdk
… prototyping phase
Internal git, OBS, imagee builder and bug tracker
Preliminary automation
Minimal team and project setup
QML applications
…getting erious
Upstream tracking best practice
QA solutions and CI – especially inter-team or with subcontractors
“Day/week/cycle in the life of a Vendor” docs
Infrastructure needs
… needs you
Not so much a ‘vendor community’ – more a co-operative
You are expected to contribute back – grants influence via the governance model
“I want to offer an encouraging note on innovation. Mer is trying to support innovation.” – David Greaves
**********
Using Qt Mobility APIs On BlackBerry 10
Fabian Bumberger, RIM
Jen note: I have hit a ‘lack of diet coke’ tired wall and have lost the ability to concentrate.
Mr. Bumberger is doing a thorough job of showing which of the Qt Mobility APIs are available right now on BlackBerry 10 and which will be available in later iterations of the SDK.
IRC: #qt-qnx
qt-project.org/wiki/QNX
fbumberger@rim.com
**********
Mer: Core OS for Mobile Qt
Carl Symons
KDE / Vault Technologies
Carl is a grassroots organizer of Linux events in Bellingham, WA.
Carl gives history of mobile linux : Moblin -> Meego -> Mer
Mer is a core OS only.
Meego had 1400+ packages.
Mer has 320 packages.
Focus – Device Providers
Complete world class platform for building commercial products
Modern, clean Linux
Easy to try; easy to port
Systems, structures, processes, code to serve device providers
Where is Mer?
X86, ARM, MIPS
NemoMobile
In-Vehicle Infotainment
Smart Home
Smart TV
Jolla/sailfish OS
What is your idea?
It doesn’t take an army of people to set something up. – Carl Symons
Platform SDK
Where Mer really shines
Full blown system for creating mobile and device software
Portable, flexible, adaptable
Available now & easy to get started
Gcc
Scratchbox
Image creation MIC
Resources
merproject.org
#mer on irc.freenode.net