Qt for Maemo 5 home screen widgets

One of the most frequently asked question after the Qt for Maemo 5 release was: "How do I create a home screen widget with Qt?". Well - the wait is over :)

Home Screen Widget

To play around with the "Hello World" widget shown in the screen shot, install qt4-maemo5-homescreen-example on the device (it's in Maemo's extras-devel repository). To get the source code, run apt-get source qt4-maemo5-homescreen-example in your Scratchbox (or clone the gitorious repository). Check out the README file for info on how to create your own Qt home screen widget. Happy home screening :)

In other news, we've also added an example on how to create control panel applets with Qt, you can find it in the Qt for Maemo 5 source code repository.


Blog Topics:

Comments

Commenting for this post has ended.

?
Andrea Grandi
0 points
185 months ago

Thank you! This is exacty what I was looking for :)

?
jgvaldecasas
0 points
185 months ago

Thanks Harald. You are right. We were waiting for this :)

?
Marcin Juszkiewicz
0 points
185 months ago

Great - will have to check code.

Now waiting for status area plugin example ;)

?
lovelyboy
0 points
185 months ago

excellent work! This will be very helpful for us.

?
lizardo
0 points
184 months ago

I looked at the source code... The pipe trick was very clever :) It should solve most incompatibilities when bridging Qt/Gtk, and the same idea can be applied to other home widget loaders as well.

BTW, do you think the loader can be shared with e.g. PySide widgets ? This would avoid having to implement a separate loader for PySide...

Thanks for the code!

?
Sampo Savola
0 points
184 months ago

Thanks!

?
na
0 points
184 months ago

how about a decent tutorial from start to finish showing EXACTLY how to port over to the n900 ????

?
The User
0 points
184 months ago

Wasn't there already a way to display Plasmoids on the home-screen?

?
Malte
0 points
184 months ago

Excellent work.

For me however the (setting) InputDialog's text field is invisible. If I comment out setAttribute(Qt::WA_TranslucentBackground) it is becomes visible . This is in scratchbox inside a vm.
Is anyone else seeing this?

?
Aki
0 points
184 months ago

I'm having difficulties with getting this to run on x86 Scratchbox. I fetched the source, compiled and installed. Everything fine so far. But when I try to add the desktop widget to the hildon desktop I get no widget but this to the console:

QGtkStyle cannot be used together with the GTK_Qt engine.

By searching the internet a bit about this it was mostly suggested that I shouldn't be using the GTK style in KDE. But I'm not doing that. Nor can I say if that has any relevance to this issue.

I am running KDE usually, but I tried Gnome quickly also. The same error message appeared there too. Any ideas what could be done?

?
Jan
0 points
184 months ago

great work i have missed the qt4-maemo5-homescreen-loader very much.
i need the qt4-maemo5-homescreen-loader also on the extra and extra-testing repository.
please release it there too

?
Toni Nikkanen
0 points
184 months ago

Thanks! It was really easy to make a real homescreen widget out of my existing Qt widget application using this one. I didn't really have to do much more than change the install location, application type in .desktop file (Application -> qt), and add the dependency to qt4-maemo5-homescreen-loader, and it started working like magic. I did not use the included adaptor class since I was already doing that X-Atom thing as per the earlier Qt homescreen example code...