So... how do I write a KDE4 widget using python ?

Rex Dieter rdieter at math.unl.edu
Thu Feb 5 19:31:00 UTC 2009


Linuxguy123 wrote:
> On Thu, 2009-02-05 at 11:45 -0700, Linuxguy123 wrote:
>> I'd like to make a simple scrolling "banner" widget for my KDE4
>> desktop.  
>>
>> I've read little blurbs about how KDE4 is now supposed to allow users to
>> write their own widgets easily using Python.  So how do I do it ?  Where
>> do I start ?
>>
>> I know about python and pyQt. But how does one make it a widget ?  Is
>> there a tutorial somewhere ?
>>
>> A few more questions... 
>>
>> I'd like my banner to be frameless.  Just scrolling text on my desktop.
>> It shouldn't doc in the taskbar. And I'd like it to handle right click
>> events.
>>
>> Is this possible ?  
> 
> I found this example.
> 
> http://techbase.kde.org/Development/Tutorials/Plasma/PythonPlasmoid
> 
> But when I run the code, I get the following:
> 
> Traceback (most recent call last):
>   File "/home/xxx/workspace/Py Banner/src/default/test.py", line 4, in
> <module>
>     from PyKDE4.plasma import Plasma
> ImportError: No module named plasma

You may need PyKDE4-4.2.0+ for that (when plasma was moved to kdelibs, 
as part of the devplatform).

-- Rex



More information about the kde mailing list