A while ago, Qt Software released some helpful software and instructions on how to make real homescreen widgets on the N900 using Qt 4.6. As I had already previously implemented my Luxus light meter widget as a sort-of homescreen widget – as part of an experiment if it’s possible to do a Qt app for N900 from scratch in one day and get it published too – I was of course intrigued in finding out how easy it would be to enable it as a full-blown homescreen widget. It turned out to be pretty easy!
The Qt Labs post in question was: http://labs.trolltech.com/blogs/2010/02/24/qt-for-maemo-5-home-screen-widgets/
My previous blog post about Luxus: http://www.tuug.fi/~toni/serendipity/index.php?/archives/12-Luxus-light-meter-desktop-widget-for-N900.html
As my application already had the X-Atom things as demonstrated by Qt Software’s previous instructions, I did not need to use the new adaptor class they introduced with this qt4-maemo5-homescreen-example app. All I really needed were:
- Add a dependency to qt4-maemo5-homescreen-loader in my binary package (debian/control)
- Tune my .desktop file to change Type to qt
- Change my installation destination paths so that the binary goes to /usr/lib/hildon-desktop/
- ..and the desktop file goes to /usr/share/applications/hildon-home/
That was it! By magic, the rest happened by itself thanks to the Qt Software stuff. Now Luxus is installable from Desktop menu->Add Widget.
Of course I didn’t stop there, I also did some visual improvements and bug fixes. One more bug remains to be fixed and that is the displaying of a frivolously small negative number in the EV mode, when the lighting is sufficiently dark. Soon I will also implement the feature additions suggested here previously – and promoting to extras-testing will happen as soon as the situation with the Qt 4.6 packages in Maemo is resolved.
See the package over here: