Help with python plasmoid

Cristo Bolaños cristo at foton.es
Mon Jan 12 21:48:23 CET 2009


Thank you for help, it works right :)

On Mon, Jan 12, 2009 at 7:40 PM, Gökmen GÖKSEL <gokmen at pardus.org.tr> wrote:

> > Hello,
> Hi !,
>
> > I'm trying to do a very simple python plasmoid in order to show a
> > Plasma.Label, but when I try to run it, I get an error:
> It will be done if you change your init method like this;
>
>        def init(self):
>         # first of all we need a layout..
>                        self.layout = QGraphicsLinearLayout(Qt.Horizontal,
> self.applet)
>
>                   # these are ok..
>         self.setHasConfigurationInterface(False)
>         self.setAspectRatioMode(Plasma.Square)
>
>         # your label's parent is self.applet not self
>         _label = Plasma.Label(self.applet)
>
>                        # set some texts
>         _label.setText("Hello Plasma !")
>
>                   # and add it to layout
>         self.layout.addItem(_label)
>
>                        # and your huge size constraints :)
>         self.resize(500, 500)
>
> > Thanks a lot!.
> Nope ;)
>
> --
> Gokmen GOKSEL
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>



-- 
"El Mundo está en las manos de aquellos que tienen el coraje de soñar y
correr el riesgo de vivir sus sueños."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20090112/3599d44e/attachment-0001.htm 


More information about the Plasma-devel mailing list