Qt 5 Cadaques is Released!

Juergen Bocklage-Ryannel and myself are writing a book! As we’ve reached the point where we want to share our work with the workd, we are happy to open the doors to the book Qt 5 Cadaques – A Book about Qt 5! It all started a couple of years back, when two developers saw a need: there where no books approaching Qt from the QML side. We decided to solve the problem by writing a book.

During these years, lots has happened in the land of Qt. The ecosystem around the Qt Project has stabilized after the whole Microsoft-Nokia thing. Jolla has released a phone with Qt 5, as has Blackberry. Ubuntu Phone will be based on Qt 5. The Raspberry Pi has taken on the whole world with a great hardware that runs great with Qt 5. It is now possible to target both Android and iOS using Qt 5.

Looking at these changes, one can see that Qt really has grown towards mobile. Towards device user interfaces. User interfaces where the look and feel has to be integrated into the context of a physical device. This is where Qt Quick and QML really shines. Before I go on, it is worth pointing out that the Qt ecosystem has grown towards mobile, it has not moved there. The cross platform desktop support is still there and works just as great as it has for almost 20 years now!

For aspiring Qt developers, there is a plethora of documentation for using Qt from C++. There are multiple books on the topic. However, when targetting devices, C++ is only a part of the story. Here, Qt Quick and QML are equally important. That is why we are happy to make Qt 5 Cadaques available!

A final word of warning. The book is being written as you read it. We believe in the open source mantra release early, release often. This means that the text currently is in its early stages. We have setup a feedback system so that you as a reader can help us improve the material by pointing out issues. We are also looking for ways to grow the contents. We also keep a project blog on the site to announce our releases and to ask you about your opinion on the book. We would love for you to tell us what you want to read about!

Raspberry Pi Night

downloadA couple of nights ago, Daniel Stenberg visited the Pelagicore offices in Gothenburg for the Raspberry Pi Night. We had 28 signed up guests and hacked, talked and played for a night.

I was personally surprised about the turn-up – and the number of projects showing up. A couple of guys even came with a lab power supply and their own embedded computer running a SNES emulator. Cool stuff! Some figures around this. We filled the event (28 tickets) in 4-5 days. We got 40+ people on the foss-gbg mailing list in two weeks.

IMG_20131120_164000

I’d like to thank everyone who showed up. Great to see a large crowd! I’d also like to thank Daniel for coming, Pelagicore for hosting and supplying food, a location and competition prizes, and to all my colleagues who helped me in the preparations. As this really took of, I’m already planning for our next event. If you want to brain storm about topics, feel free to drop me a mail (e8johan, gmail). I’m already thinking 3D printing, quad copters, node.js in embedded, Wayland, etc.

Raspberry Pi Night in Gothenburg

The event described below is in Sweden, in Swedish, so simply skip ahead if the rest sounds like gibberish.

Embedded Linux, Automotive, Real-time? Daniel Stenberg, känd från curl, ssh2 and c-ares kommer till stan!

Vi samlas, snackar och hackar inbyggd Linux några timmar. Dra med dig din raspberry pi, beagleboard, pandaboard, androidtelefon eller liknande och vi bygger och installerar egen-byggda uboots, Linux-kernels och rootfilsystem på dem! Har du inte ett eget inbyggt “device” att jobba med kan du säkert låna ett roligt kort när du kommer eller hjälpa någon annan. Dela med dig av ditt projekt och få hjälp, eller häng på någons annans projekt och hjälp till!

Från klockan 16 till klockan 20, i Pelagicores lokaler på Ekelundsgatan 4.

Vi kommer också att krydda kvällen med ett föredrag av Daniel Stenberg med arbetstiteln “real time challenges with Linux” samt en tävling på temat “inbyggd open source”.

Allt händer under Raspberry Pi Night hos Pelagicore, anmälan på https://www.eventbrite.com/event/9160558477 . Begränsat antal platser!

The Cuecumber Cam

This spring, I invested in a greenhouse. As soon as the green stuff was growing, the little nerd in me saw some room for improvement. I got a Raspberry Pi model A, a solar charger case from cottonpicker’s and a cheap webcam. As it turns out, the batteries from the solar case only provide an around 4.8V, so the webcam sort of killed the system over night, and then the charging plus booting never actually got the system reliably running during each day. The results of 3 weeks in the field is the following little timelapse showing cuecumbers…

timelapseSo, next attempt will be to set this up with a Raspberry Pi camera module. Lets see if that gives a more stable system…

Jolla Launch

Jolla has finally launched the first hints to their first hardware. Being an old N9 user, having dropped his phone, I really do want one. The N9 easily outperformed my current Samsung S3, despite its ancient hardware, so I’m really excited about what Jolla will be able to do with modern hardware.

wide_Jolla_devices

The specs are a bit sketchy at the moment, but I guess things might become more clear tonight. For €399 you will bet a 4.5″ Estrade display, a dual core CPU and 4G support (in some markets, which will be announced later). 16GB of on-board FLASH and support for microSD means that there will be ample space for music, photos, videos and applications.

An 8MP camera seems to be commodity today, but the user-replaceable battery is a nicety.

So, nothing about the performance of the CPU, or even the family. I expect an ARM in the 1GHz range, which will be more than double the power, compared to the N9. Regarding the screen, I do hope for a screen as nice as the N9. I’m kind of worried that no resolution is specified, and Google does not seem to know what an “Estrade” screen is – hopefully it is good. As Europe is targeted first, I hope that the 4G standard supported will be LTE and will work in Swedish networks.

On the software side, I’m really excited about the Sailfish OS and the Gestures. This is what the N9 started, and the N9 is the only real one-hand device I’ve experienced. Finally a Qt / QML environment with the ambition to bring something new to the table.

As for Android app support, I’m not convinced. The power of the N9 was the pure performance of native applications. Adding an Android stack will use system resources and experience the same performance penalty that pure Android systems face. Also, I guess “app compliant” does not mean certified, i.e. does Google Play work? Still, there will be loads of apps, so everyone can use their favorite service. I hope that the Android stack is loaded when needed, so that it doesn’t take resources when using a purely native setup of apps.

At the time of writing, I cannot register a pre-order as the site is down. I only get 503. This must be a good sign, I guess ;-).

tt-rss in debian stable

I run a little server of my own with debian stable. Now, I wanted Tiny Tiny RSS, as Google just showed why relying on the cloud isn’t a good thing.

As tt-rss only lives in unstable, I decided to backport it. In order to do so, I had to backport the following packages (in this order):

  • libarchive-zip-perl, which is a build dependecy to rhino
  • javahelper, which is a build dependency to shrinksafe
  • rhino (and thus also librhino-java), which are build dependencies to shrinksafe
  • shrinksafe, which is a build dependecy to dojo
  • libjs-dojo-core (and thus also libjs-dojo-dijit), which both are dependencies to tt-rss
  • prototypejs, which is a dependency of tt-rss
  • tt-rss

I hope I did not mix up what is a build dependencies and install dependencies, but it does not really matter. You will have to apt-get build-dep foo && apt-get -b source foo for each of these. Then dpkg -i foo the resulting debs. You might also have to install some prepackaged stuff, as dpkg doesn’t resolve the dependencies automatically.

Having tt-rss up and running, I migrated my subscriptions from google reader, installed the Android app and waited. The first time, tt-rss gets the whole feed, so you’ll have to wait a while (a couple of hours in my case) and then mark all as read, then everything works nicely.

There are few other cloud services that I depend on as much as a good RSS reader (I tend to read from many different devices, depending on where I am). But it is unlikely that I’ll every again will trust a cloud service as a critical part of my day-to-day workflow. Just look at what happened to tinkercad (which I did not rely on).

Update on Work

As some of you know, I work for Pelagicore. We do in-vehicle infotainment using open source, Linux and Qt. I’m not in Las Vegas right now, but a whole bunch of colleagues are there, showing of at CES.  This year, we’re doing loads of demos together with various partners. We demo together with Visteon (makes infotainment hardware, and more), Digia (makers of Qt), GENIVI (infotainment platform standardization organization), Cinemo (media indexing, rendering and streaming) and Rightware (cool 3D UIs).

IMG_20130108_111108

One of the fun parts of working at Pelagicore is that you get to see cool hardware. I’ve personally worked with Qt on Intel prototype systems, Freescale iMXs, TI’s OMAPs and more stuff that I can’t mention. This year’s demo setup for CES is based on iMX6. The UI has been developed with DesignIt, our design partner company. Let’s face it, those who enjoy coding generally do not excel at polishing pixels. With their help, we’ve been able to make something really beautiful. The picture I’ve got of the UI itself does not say much of the look and feel, but it has a nice reflection of my kind colleague taking the photos, so I’ll use it to say thanks to him and give some credits ;-).

IMG_20130108_111352

The demo is built around Qt and QtQuick (what else is there :-P) on a Linux platform. It integrates our core platform with all the services you might need. For CES, we have some new stuff in there. I have been involved in the integration of technologies from two other companies.

First, we have Righware and Kanzi, a nice 3D engine with an easy to use studio to create the scenes. The car shown below spins around as you change position with nice lighting and material effects. The demo is integrated as an element in the QML scene, and it is possible to bind to and from Kanzi properties, as well as hook into events from Kanzi UI elements, e.g. 3D slides and buttons.

IMG_20130108_111440

The second piece of technology is Cinemo’s media platform. It indexes, renders and streams video and audio. For instance, you can sync multiple devices showing the same video stream, so that you can share the audio through the main speakers. Again, the video stream is integrated into the QML scene, so you can do all sorts of fancy things with it. The images below show an iPad and our demo system sharing a video stream. As you can see, you can control it from either device, and they are always in perfect frame sync.

IMG_20130108_111136+7

From a business standpoint, I guess CES is one of the highlights of the year. We really get to show our stuff to a large audience. However, since I’m not in sales, to me it means overtime, but also having a chance to work with companies making awesome technology. Also, as an added bonus this year, we got to work closely with our team of former Trolls based in Munich, which always is good fun.

So, to all of you at CES. Come visit our demos! To the rest of you, look our for our platform in your next car!

Changed behaviour in Qt 5 beta 2

So, I’ve taken the time to shift my development target at work to Qt 5 beta 2 (from beta 1). Most things work perfectly, however, qmake has changed its behaviour slightly – in a subtle evil way.

First, some background. I’m building a QML plugin. When building it with beta 2, it no longer loads as it could no longer resolve the vtable for one of my classes.

$ readelf -sW /home/e8johan/work/prf/lamprey/lamprey/lib/liblampreyqml.so | grep UND | grep QmlAudioHardware | c++filt 
    45: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND vtable for QmlAudioHardware
    47: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND QmlAudioHardware::nameChanged()
    50: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND QmlAudioHardware::volumeChanged()
   288: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND vtable for QmlAudioHardware
   301: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND QmlAudioHardware::nameChanged()
   308: 00000000     0 NOTYPE  GLOBAL DEFAULT  UND QmlAudioHardware::volumeChanged()

What was this all about? I looked at the source, commit logs, everything – nothing had changed and everything was in place. Inheritance – check, Q_OBJECT macro – check, file listed in HEADERS in the pro-file – check…

Then I started to look at what was actually built. Apparently not the moc

$ find | grep moc | grep qml
./qml-plugin/build/moc
./qml-plugin/build/moc/moc_qml-plugin.cpp
./qml-plugin/build/obj/moc_qml-plugin.o
./qml-bindings/src/build/moc
./qml-bindings/src/build/moc/moc_http_downloader.cpp
./qml-bindings/src/build/obj/moc_http_downloader.o

Since the software I build worked, I simply built it using qmake && make -j5 and then went for a coffee. When doing qmake -recursive I notices a long list of header files that weren’t found:

$ qmake-qt5 -recursive
...
Reading /home/e8johan/work/prf/lamprey/lamprey/qml-bindings/qml-bindings.pro
 Reading /home/e8johan/work/prf/lamprey/lamprey/qml-bindings/src/src.pro
WARNING: Failure to find: qml_audiohw.h
...

Why?! Apparently, a colleague of mine has already reported a bug, and this is the way that it is supposed to be. I’m not sure that I agree. This totally breaks the point of DEPENDPATH to me.

The fix is easy, so now it works, but I’m not happy with loads of ../include in my pro-files due to the way my codebase is structured. I just wonder if this is what we really want…

Update! and it turns out that, yes, that is really what we do want. Apparently this feature has broken code (VPATH causing the wrong files to be picked up). So this is by design.

Update again! running qmake -Wall -r treats the missing header warning as an error. Highly recommended!

Speaking at Qt Developer Conference

I’ve finally been able to find a time slot to try to summarize the Qt Developer Conference. This year I ended up spending lots of time in our booth, so I’ve visited surprisingly few talks. I’m really hoping that KDAB will be able to sort out the issues that they’ve had with audio, so that they can get them on-line. In the mean time, I’d like to share my reflections of the event. From my own viewpoint, is was great seeing so many familiar faces again. Seeing that the event sold out, i.e. 500+ visitors, was great. I knew that the Qt community was strong, but this is great!

From what they keynotes contained and what people said, I also like the direction that the Qt project is taking. Back to the deploy everywhere is something that I’ve been looking for a long time. I even talked about it at FSCONS last year, even though my topic was Necessitas (which worked too well to do a good tech session on it; what is interesting in install, deploy, run…) Hearing that cross platform is key and that Digia supports bringing it to both iOS and Android during 2013 is great.

Another nice thing is Jolla (not actually on QtDC) and BB10. It is ironic to see that what Nokia saw as a burning platforms is picked as the way forward by two competitors. Let’s hope that they succeed and can show app developers what Qt and QtQuick really can do.

Also, seeing the whole group of service providers working around and inside the Qt project makes me happy. Not only the big ones providing general services around Qt, but also smaller niche players. All are able to live because the productivity boost that Qt gives. Taking Qt to a niche of your own seems to be a great way to build a business.

Finally, I did my speech on the morning the last day. The room was deserted when I arrived, but everything worked. I was even able to convince my laptop to play nice with the projector. I’m happy to say that when I finally got going, it was full. There where even a few people standing along the wall. Thank you all for attending! The slides are on the conference page, but also downloadable from here.

Thanks for everyone making it possible for all the Qt developers to meet in 2012! Let’s all meet again in 2013!