maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Development (https://talk.maemo.org/forumdisplay.php?f=13)
-   -   python qt home widgets (https://talk.maemo.org/showthread.php?t=43177)

irooniam 2010-02-03 01:50

python qt home widgets
 
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.

danielwilms 2010-02-03 08:20

Re: python qt home widgets
 
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

irooniam 2010-02-03 09:31

Re: python qt home widgets
 
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?

danielwilms 2010-02-03 12:02

Re: python qt home widgets
 
Quote:

Originally Posted by irooniam (Post 508165)
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

lizardo 2010-02-04 12:25

Re: python qt home widgets
 
Quote:

Originally Posted by danielwilms (Post 508403)
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)?

krk969 2010-02-11 12:32

Re: python qt home widgets
 
Quote:

Originally Posted by danielwilms (Post 508403)
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 2010-02-11 12:35

Re: python qt home widgets
 
Quote:

Originally Posted by lizardo (Post 510286)
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.

danielwilms 2010-02-25 09:27

Re: python qt home widgets
 
Hi,

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

Daniel

krk969 2010-02-25 09:47

Re: python qt home widgets
 
Quote:

Originally Posted by danielwilms (Post 545523)
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) .:D
I would really expect it to be an attribute like Qt::WA_Maemo5DesktopApplet instead of assuming underlying window manager (x11) details.

mikec 2010-03-28 11:02

Re: python qt home widgets
 
Quote:

Originally Posted by danielwilms (Post 508403)
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


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

vBulletin® Version 3.8.8