Active Topics

 


Reply
Thread Tools
Posts: 13 | Thanked: 2 times | Joined on Sep 2009
#1
Hello,

does anyone have an example / sample code of using python + qt to create a home widget?

I've seen example using gtk + hildon, but my understanding is that going forward qt will be "the" toolbox on nokia.


Any help would be appreciated.
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#2
Hi,

with Qt 4.5 you need a workaround for desktop widgets, which doesn't make much sense to integrate in the python-bindings, as attila77 stated in this thread. In 4.6 it will be easier. I will try to get together an example on how to do that.

Daniel
 
Posts: 13 | Thanked: 2 times | Joined on Sep 2009
#3
Thanks Daniel.

I was looking at pyside's documentation regarding qdesktopwidget class: http://www.pyside.org/docs/pyside/Py...topWidget.html

Is this the class I should be looking at?
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#4
Originally Posted by irooniam View Post
Is this the class I should be looking at?
Nope. In 4.6 there are two parts creating a desktop widget. First getting a widget on the desktop, which can be done by setting the Qt::WA_Maemo5DesktopApplet attribute for a widget. The second part, which is much trickier, is the integration as a normal GTK widget. People are working on an example. I will let you know, as soon as the example is available.

Daniel
 

The Following 4 Users Say Thank You to danielwilms For This Useful Post:
Posts: 53 | Thanked: 90 times | Joined on Nov 2009 @ Manaus, Brazil
#5
Originally Posted by danielwilms View Post
Nope. In 4.6 there are two parts creating a desktop widget. First getting a widget on the desktop, which can be done by setting the Qt::WA_Maemo5DesktopApplet attribute for a widget. The second part, which is much trickier, is the integration as a normal GTK widget. People are working on an example. I will let you know, as soon as the example is available.
Does this mean that the widget will run as a separate process (unlike the C ones which are compiled as .so's loaded by the default loader, or the Python ones which are loaded by the Python loader)?
__________________
Anderson Lizardo
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#6
Originally Posted by danielwilms View Post
Nope. In 4.6 there are two parts creating a desktop widget. First getting a widget on the desktop, which can be done by setting the Qt::WA_Maemo5DesktopApplet attribute for a widget. The second part, which is much trickier, is the integration as a normal GTK widget. People are working on an example. I will let you know, as soon as the example is available.

Daniel
Ive tried this with my Batlevel app and I can confirm it works ( on my N900 )
Prior to this I was playing with the atom ( HD_TYPE_HOME_PLUGIN_ITEM ) in my QT code which looked real ugly in code. This is a nice move, and I hope something is available for QT status menu widgets as well soon.

But , this feature was available in QT4.6 tp2 uploaded to extras-devel repo on 3Feb and QT4.6 uploaded on 10Feb has lost it, dont know if it was intentionally removed .

How do I know ? ( my build failed ) , also confirmed from the source files in the repo.

So I guess we need to wait before this hits the repository again.

Anyways, this is still TP so that means the team is still wokring and Quim has posted a general warning for all apps using QT4.6 .
 
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#7
Originally Posted by lizardo View Post
Does this mean that the widget will run as a separate process (unlike the C ones which are compiled as .so's loaded by the default loader, or the Python ones which are loaded by the Python loader)?
C++/QT app done using the above will still open up an ugly window and the window dissappears in a few seconds leaving the widget on your desktop.

Dont know if Python widgets behave the same way, I understand they can be added as a widget using the add widget menu, so perhaps this wont happen.
 
Posts: 432 | Thanked: 645 times | Joined on Mar 2009
#8
Hi,

here is a blog-post of harald with an example how to create qt homescreen widgets in Maemo5.

Daniel
 

The Following 3 Users Say Thank You to danielwilms For This Useful Post:
krk969's Avatar
Posts: 754 | Thanked: 630 times | Joined on Sep 2009 @ London
#9
Originally Posted by danielwilms View Post
Hi,

here is a blog-post of harald with an example how to create qt homescreen widgets in Maemo5.

Daniel
I hope thats only another example and not the way forward to create desktop applets in QT (*EDIT* for maemo) .
I would really expect it to be an attribute like Qt::WA_Maemo5DesktopApplet instead of assuming underlying window manager (x11) details.
__________________
Developer of :
Buddy - budget/expense manager ( website )
Showtime - a telly channel listing viewer/reminder ( website )
Travelapp - london underground status/planner ( website )
Batlevel - desktop widget for battery level ( website )

“I hear and I forget. I see and I remember. I do and I understand.”

Last edited by krk969; 2010-02-25 at 09:53.
 

The Following User Says Thank You to krk969 For This Useful Post:
mikec's Avatar
Posts: 1,366 | Thanked: 1,185 times | Joined on Jan 2006
#10
Originally Posted by danielwilms View Post
Nope. In 4.6 there are two parts creating a desktop widget. First getting a widget on the desktop, which can be done by setting the Qt::WA_Maemo5DesktopApplet attribute for a widget. The second part, which is much trickier, is the integration as a normal GTK widget. People are working on an example. I will let you know, as soon as the example is available.

Daniel
how are doing with a Python example. ?
I have a port of the svg cairo clock to Qt waiting to be converted to a homescreen widget.

mike c
__________________
N900_Email_Options Wiki Page
 
Reply


 
Forum Jump


All times are GMT. The time now is 11:13.