Help with python plasmoid

Gökmen GÖKSEL gokmen at pardus.org.tr
Mon Jan 12 20:40:34 CET 2009


> 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


More information about the Plasma-devel mailing list