<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://techbase.kde.org/skins/common/feed.css?0.2"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;feed=atom&amp;action=history</id>
		<title>Development/Tutorials/Plasma/Python/Using widgets - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;feed=atom&amp;action=history"/>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;action=history"/>
		<updated>2013-06-19T04:49:18Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.20.2</generator>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=60648&amp;oldid=prev</id>
		<title>Neverendingo: Text replace - &quot;&lt;/code&gt;&quot; to &quot;&lt;/syntaxhighlight&gt;&quot;</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=60648&amp;oldid=prev"/>
				<updated>2011-06-29T20:54:13Z</updated>
		
		<summary type="html">&lt;p&gt;Text replace - &amp;quot;&amp;lt;/code&amp;gt;&amp;quot; to &amp;quot;&amp;lt;/syntaxhighlight&amp;gt;&amp;quot;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:54, 29 June 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 41:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; return HelloWorldApplet(parent)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; return HelloWorldApplet(parent)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Let's take a deeper look at it. As in the main tutorial, we create our class by deriving from the &amp;lt;tt&amp;gt;plasmascript.Applet&amp;lt;/tt&amp;gt; class. In &amp;lt;tt&amp;gt;__init__()&amp;lt;/tt&amp;gt;, we quickly initialize the class. We use the &amp;lt;tt&amp;gt;init()&amp;lt;/tt&amp;gt; method instead to do all the dirty work of creating the applet and adding the widget needed to display the text.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Let's take a deeper look at it. As in the main tutorial, we create our class by deriving from the &amp;lt;tt&amp;gt;plasmascript.Applet&amp;lt;/tt&amp;gt; class. In &amp;lt;tt&amp;gt;__init__()&amp;lt;/tt&amp;gt;, we quickly initialize the class. We use the &amp;lt;tt&amp;gt;init()&amp;lt;/tt&amp;gt; method instead to do all the dirty work of creating the applet and adding the widget needed to display the text.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Neverendingo</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=59842&amp;oldid=prev</id>
		<title>Neverendingo: Text replace - &quot;&lt;code python&gt;&quot; to &quot;&lt;syntaxhighlight lang=&quot;python&quot;&gt;&quot;</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=59842&amp;oldid=prev"/>
				<updated>2011-06-29T20:34:30Z</updated>
		
		<summary type="html">&lt;p&gt;Text replace - &amp;quot;&amp;lt;code python&amp;gt;&amp;quot; to &amp;quot;&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&amp;quot;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:34, 29 June 2011&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Here is how our main.py file will look like:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Here is how our main.py file will look like:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;code &lt;/del&gt;python&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;syntaxhighlight lang=&amp;quot;&lt;/ins&gt;python&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;quot;&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# -*- coding: utf-8 -*-&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# -*- coding: utf-8 -*-&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Copyright stuff&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Copyright stuff&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Neverendingo</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=52266&amp;oldid=prev</id>
		<title>Phobie: /* The 'main.py' file */ never &quot;use from x import *&quot;!</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=52266&amp;oldid=prev"/>
				<updated>2010-06-23T23:58:04Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;The &amp;#039;main.py&amp;#039; file: &lt;/span&gt; never &amp;quot;use from x import *&amp;quot;!&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 23:58, 23 June 2010&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 12:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code python&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;code python&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;# -*- coding: utf-8 -*-&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Copyright stuff&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;# Copyright stuff&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;from PyQt4.QtCore import &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;from PyQt4.QtCore import &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Qt&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;from PyQt4.QtGui import &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;from PyQt4.QtGui import &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;QGraphicsLinearLayout&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;from PyKDE4.plasma import Plasma&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;from PyKDE4.plasma import Plasma&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;from PyKDE4 import plasmascript&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;from PyKDE4 import plasmascript&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Phobie</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=45755&amp;oldid=prev</id>
		<title>Thomas Olsen: Changed self.setLayout(self.layout) to self.applet.setLayout(self.layout)</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=45755&amp;oldid=prev"/>
				<updated>2009-10-24T22:58:06Z</updated>
		
		<summary type="html">&lt;p&gt;Changed self.setLayout(self.layout) to self.applet.setLayout(self.layout)&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 22:58, 24 October 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; label.setText(&amp;quot;Hello world!&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; label.setText(&amp;quot;Hello world!&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self.layout.addItem(label)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self.layout.addItem(label)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self.setLayout(self.layout)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.applet&lt;/ins&gt;.setLayout(self.layout)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self.resize(125,125)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self.resize(125,125)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;QBoxLayout&amp;lt;/tt&amp;gt; seen in Qt and PyQt, because it is done inside a &amp;lt;tt&amp;gt;QGraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a &amp;lt;tt&amp;gt;QGraphicsLinearLayout&amp;lt;/tt&amp;gt;, setting it to be horizontal (&amp;lt;tt&amp;gt;Qt.Horizontal&amp;lt;/tt&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;QBoxLayout&amp;lt;/tt&amp;gt; seen in Qt and PyQt, because it is done inside a &amp;lt;tt&amp;gt;QGraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a &amp;lt;tt&amp;gt;QGraphicsLinearLayout&amp;lt;/tt&amp;gt;, setting it to be horizontal (&amp;lt;tt&amp;gt;Qt.Horizontal&amp;lt;/tt&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a &amp;lt;tt&amp;gt;Plasma.Label&amp;lt;/tt&amp;gt;. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout. Also, we set the applet's layout to be the one we have just defined using &amp;lt;tt&amp;gt;self.setLayout&amp;lt;/tt&amp;gt;. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a &amp;lt;tt&amp;gt;Plasma.Label&amp;lt;/tt&amp;gt;. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout. Also, we set the applet's layout to be the one we have just defined using &amp;lt;tt&amp;gt;self&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.applet&lt;/ins&gt;.setLayout&amp;lt;/tt&amp;gt;. Finally we resize the applet to 125 x 125 pixels&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. When using &amp;lt;tt&amp;gt;self.applet.setLayout(self.layout)&amp;lt;/tt&amp;gt; it is really not necessary to resize the applet because the layout will make sure that the applet has a reasonable size&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once packaged and installed (see [[../GettingStarted | the Getting Started tutorial]]), the Plasmoid will look like this:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once packaged and installed (see [[../GettingStarted | the Getting Started tutorial]]), the Plasmoid will look like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Thomas Olsen</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=44303&amp;oldid=prev</id>
		<title>Agateau: /* The 'main.py' file */</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=44303&amp;oldid=prev"/>
				<updated>2009-08-29T20:54:13Z</updated>
		
		<summary type="html">&lt;p&gt;‎&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;The &amp;#039;main.py&amp;#039; file&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:54, 29 August 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;First of all we tell Plasma that this applet does not have a configuration dialog (&amp;lt;tt&amp;gt;self.setHasConfigurationInterface(False)&amp;lt;/tt&amp;gt;). We then set the aspect ratio mode to a square (&amp;lt;tt&amp;gt;Plasma.Square&amp;lt;/tt&amp;gt;). This is taken into account when someone resizes the applet. Next, we add a background to the applet using a SVG image provided by the standard Plasma theme. We do so by creating an instance of &amp;lt;tt&amp;gt;Plasma.Svg&amp;lt;/tt&amp;gt;, assigning it to &amp;lt;tt&amp;gt;self.theme&amp;lt;/tt&amp;gt;, and then specifying the SVG graphic we want to use via &amp;lt;tt&amp;gt;self.setImagePath()&amp;lt;/tt&amp;gt;. This way the applet will use the standard &amp;quot;background&amp;quot; SVG provided by the &amp;quot;widgets&amp;quot; directory of our current Plasma theme. We can also use relative paths or absolute paths to SVGs of our choice, should we need to. The &amp;lt;tt&amp;gt;setBackgroundHints()&amp;lt;/tt&amp;gt; method sets the Plasmoid's background to the default Plasma background (&amp;lt;tt&amp;gt;Plasma.Applet.DefaultBackground&amp;lt;/tt&amp;gt;) saving us from having to manually draw the background ourselves.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;First of all we tell Plasma that this applet does not have a configuration dialog (&amp;lt;tt&amp;gt;self.setHasConfigurationInterface(False)&amp;lt;/tt&amp;gt;). We then set the aspect ratio mode to a square (&amp;lt;tt&amp;gt;Plasma.Square&amp;lt;/tt&amp;gt;). This is taken into account when someone resizes the applet. Next, we add a background to the applet using a SVG image provided by the standard Plasma theme. We do so by creating an instance of &amp;lt;tt&amp;gt;Plasma.Svg&amp;lt;/tt&amp;gt;, assigning it to &amp;lt;tt&amp;gt;self.theme&amp;lt;/tt&amp;gt;, and then specifying the SVG graphic we want to use via &amp;lt;tt&amp;gt;self.setImagePath()&amp;lt;/tt&amp;gt;. This way the applet will use the standard &amp;quot;background&amp;quot; SVG provided by the &amp;quot;widgets&amp;quot; directory of our current Plasma theme. We can also use relative paths or absolute paths to SVGs of our choice, should we need to. The &amp;lt;tt&amp;gt;setBackgroundHints()&amp;lt;/tt&amp;gt; method sets the Plasmoid's background to the default Plasma background (&amp;lt;tt&amp;gt;Plasma.Applet.DefaultBackground&amp;lt;/tt&amp;gt;) saving us from having to manually draw the background ourselves.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;QLinearLayout&lt;/del&gt;&amp;lt;/tt&amp;gt; seen in Qt and PyQt, because it is done inside a &amp;lt;tt&amp;gt;QGraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a &amp;lt;tt&amp;gt;QGraphicsLinearLayout&amp;lt;/tt&amp;gt;, setting it to be horizontal (&amp;lt;tt&amp;gt;Qt.Horizontal&amp;lt;/tt&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;QBoxLayout&lt;/ins&gt;&amp;lt;/tt&amp;gt; seen in Qt and PyQt, because it is done inside a &amp;lt;tt&amp;gt;QGraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a &amp;lt;tt&amp;gt;QGraphicsLinearLayout&amp;lt;/tt&amp;gt;, setting it to be horizontal (&amp;lt;tt&amp;gt;Qt.Horizontal&amp;lt;/tt&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a &amp;lt;tt&amp;gt;Plasma.Label&amp;lt;/tt&amp;gt;. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout. Also, we set the applet's layout to be the one we have just defined using &amp;lt;tt&amp;gt;self.setLayout&amp;lt;/tt&amp;gt;. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a &amp;lt;tt&amp;gt;Plasma.Label&amp;lt;/tt&amp;gt;. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout. Also, we set the applet's layout to be the one we have just defined using &amp;lt;tt&amp;gt;self.setLayout&amp;lt;/tt&amp;gt;. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Agateau</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=38127&amp;oldid=prev</id>
		<title>Tampakrap: Added link to widget API definitions</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=38127&amp;oldid=prev"/>
				<updated>2009-02-02T02:56:44Z</updated>
		
		<summary type="html">&lt;p&gt;Added link to widget API definitions&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 02:56, 2 February 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 56:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 56:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Conclusion ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Conclusion ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This brief tutorial shows how to use Plasma widgets with your applet. Beside &amp;lt;tt&amp;gt;Plasma.Label&amp;lt;/tt&amp;gt; there are many more widgets that you can use.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This brief tutorial shows how to use Plasma widgets with your applet. Beside &amp;lt;tt&amp;gt;Plasma.Label&amp;lt;/tt&amp;gt; there are many more widgets that you can use&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;. The [http://api.kde.org/4.x-api/kdelibs-apidocs/plasma/html/annotated.html C++ widget definitions] should be used till a python API is put up&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Notice that at the moment you can only add widgets and create layouts directly in code. This means you can't use an application like Qt Designer to design the appearance of your applet.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Notice that at the moment you can only add widgets and create layouts directly in code. This means you can't use an application like Qt Designer to design the appearance of your applet.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Tampakrap</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=37854&amp;oldid=prev</id>
		<title>Nielsslot at 20:35, 25 January 2009</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=37854&amp;oldid=prev"/>
				<updated>2009-01-25T20:35:24Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:35, 25 January 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;QLinearLayout&amp;lt;/tt&amp;gt; seen in Qt and PyQt, because it is done inside a &amp;lt;tt&amp;gt;QGraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a &amp;lt;tt&amp;gt;QGraphicsLinearLayout&amp;lt;/tt&amp;gt;, setting it to be horizontal (&amp;lt;tt&amp;gt;Qt.Horizontal&amp;lt;/tt&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;QLinearLayout&amp;lt;/tt&amp;gt; seen in Qt and PyQt, because it is done inside a &amp;lt;tt&amp;gt;QGraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a &amp;lt;tt&amp;gt;QGraphicsLinearLayout&amp;lt;/tt&amp;gt;, setting it to be horizontal (&amp;lt;tt&amp;gt;Qt.Horizontal&amp;lt;/tt&amp;gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a &amp;lt;tt&amp;gt;Plasma.Label&amp;lt;/tt&amp;gt;. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout.Also, we set the applet's layout to be the one we have just defined using &amp;lt;tt&amp;gt;self.setLayout&amp;lt;/tt&amp;gt;. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a &amp;lt;tt&amp;gt;Plasma.Label&amp;lt;/tt&amp;gt;. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout. Also, we set the applet's layout to be the one we have just defined using &amp;lt;tt&amp;gt;self.setLayout&amp;lt;/tt&amp;gt;. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once packaged and installed (see [[../GettingStarted | the Getting Started tutorial]]), the Plasmoid will look like this:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once packaged and installed (see [[../GettingStarted | the Getting Started tutorial]]), the Plasmoid will look like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nielsslot</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=37853&amp;oldid=prev</id>
		<title>Nielsslot: Add missing &lt;tt&gt; tags.</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=37853&amp;oldid=prev"/>
				<updated>2009-01-25T20:33:40Z</updated>
		
		<summary type="html">&lt;p&gt;Add missing &amp;lt;tt&amp;gt; tags.&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:33, 25 January 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 46:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;First of all we tell Plasma that this applet does not have a configuration dialog (&amp;lt;tt&amp;gt;self.setHasConfigurationInterface(False)&amp;lt;/tt&amp;gt;). We then set the aspect ratio mode to a square (&amp;lt;tt&amp;gt;Plasma.Square&amp;lt;/tt&amp;gt;). This is taken into account when someone resizes the applet. Next, we add a background to the applet using a SVG image provided by the standard Plasma theme. We do so by creating an instance of &amp;lt;tt&amp;gt;Plasma.Svg&amp;lt;/tt&amp;gt;, assigning it to &amp;lt;tt&amp;gt;self.theme&amp;lt;/tt&amp;gt;, and then specifying the SVG graphic we want to use via &amp;lt;tt&amp;gt;self.setImagePath()&amp;lt;/tt&amp;gt;. This way the applet will use the standard &amp;quot;background&amp;quot; SVG provided by the &amp;quot;widgets&amp;quot; directory of our current Plasma theme. We can also use relative paths or absolute paths to SVGs of our choice, should we need to. The &amp;lt;tt&amp;gt;setBackgroundHints()&amp;lt;/tt&amp;gt; method sets the Plasmoid's background to the default Plasma background (&amp;lt;tt&amp;gt;Plasma.Applet.DefaultBackground&amp;lt;/tt&amp;gt;) saving us from having to manually draw the background ourselves.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;First of all we tell Plasma that this applet does not have a configuration dialog (&amp;lt;tt&amp;gt;self.setHasConfigurationInterface(False)&amp;lt;/tt&amp;gt;). We then set the aspect ratio mode to a square (&amp;lt;tt&amp;gt;Plasma.Square&amp;lt;/tt&amp;gt;). This is taken into account when someone resizes the applet. Next, we add a background to the applet using a SVG image provided by the standard Plasma theme. We do so by creating an instance of &amp;lt;tt&amp;gt;Plasma.Svg&amp;lt;/tt&amp;gt;, assigning it to &amp;lt;tt&amp;gt;self.theme&amp;lt;/tt&amp;gt;, and then specifying the SVG graphic we want to use via &amp;lt;tt&amp;gt;self.setImagePath()&amp;lt;/tt&amp;gt;. This way the applet will use the standard &amp;quot;background&amp;quot; SVG provided by the &amp;quot;widgets&amp;quot; directory of our current Plasma theme. We can also use relative paths or absolute paths to SVGs of our choice, should we need to. The &amp;lt;tt&amp;gt;setBackgroundHints()&amp;lt;/tt&amp;gt; method sets the Plasmoid's background to the default Plasma background (&amp;lt;tt&amp;gt;Plasma.Applet.DefaultBackground&amp;lt;/tt&amp;gt;) saving us from having to manually draw the background ourselves.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;QLinearLayout&amp;lt;/tt&amp;gt; seen in Qt and PyQt, because it is done inside a &amp;lt;tt&amp;gt;QGraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a QGraphicsLinearLayout, setting it to be horizontal (Qt.Horizontal).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;QLinearLayout&amp;lt;/tt&amp;gt; seen in Qt and PyQt, because it is done inside a &amp;lt;tt&amp;gt;QGraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;QGraphicsLinearLayout&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;, setting it to be horizontal (&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;Qt.Horizontal&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a Plasma.Label. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout.Also, we set the applet's layout to be the one we have just defined using &amp;lt;tt&amp;gt;self.setLayout&amp;lt;/tt&amp;gt;. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;tt&amp;gt;&lt;/ins&gt;Plasma.Label&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;&amp;lt;/tt&amp;gt;&lt;/ins&gt;. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout.Also, we set the applet's layout to be the one we have just defined using &amp;lt;tt&amp;gt;self.setLayout&amp;lt;/tt&amp;gt;. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once packaged and installed (see [[../GettingStarted | the Getting Started tutorial]]), the Plasmoid will look like this:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once packaged and installed (see [[../GettingStarted | the Getting Started tutorial]]), the Plasmoid will look like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Nielsslot</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=37598&amp;oldid=prev</id>
		<title>Einar: Add setLayout in the code and in the explanation</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=37598&amp;oldid=prev"/>
				<updated>2009-01-19T20:38:17Z</updated>
		
		<summary type="html">&lt;p&gt;Add setLayout in the code and in the explanation&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 20:38, 19 January 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 34:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; label.setText(&amp;quot;Hello world!&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; label.setText(&amp;quot;Hello world!&amp;quot;)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self.layout.addItem(label)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self.layout.addItem(label)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;#160;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self.setLayout(self.layout)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self.resize(125,125)&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&amp;#160; &amp;#160; &amp;#160; &amp;#160; self.resize(125,125)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 47:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 48:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;QLinearLayout&amp;lt;/tt&amp;gt; seen in Qt and PyQt, because it is done inside a &amp;lt;tt&amp;gt;QGraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a QGraphicsLinearLayout, setting it to be horizontal (Qt.Horizontal).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The third and most important step deals with creating a layout. It is a bit different than the standard &amp;lt;tt&amp;gt;QLinearLayout&amp;lt;/tt&amp;gt; seen in Qt and PyQt, because it is done inside a &amp;lt;tt&amp;gt;QGraphicsView&amp;lt;/tt&amp;gt; used by Plasma. We want a simple, linear layout, and so we use a QGraphicsLinearLayout, setting it to be horizontal (Qt.Horizontal).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a Plasma.Label. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a Plasma.Label. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;.Also, we set the applet's layout to be the one we have just defined using &amp;lt;tt&amp;gt;self.setLayout&amp;lt;/tt&amp;gt;&lt;/ins&gt;. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once packaged and installed (see [[../GettingStarted | the Getting Started tutorial]]), the Plasmoid will look like this:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once packaged and installed (see [[../GettingStarted | the Getting Started tutorial]]), the Plasmoid will look like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Einar</name></author>	</entry>

	<entry>
		<id>http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=37549&amp;oldid=prev</id>
		<title>Sedwards: fixed links</title>
		<link rel="alternate" type="text/html" href="http://techbase.kde.org/index.php?title=Development/Tutorials/Plasma/Python/Using_widgets&amp;diff=37549&amp;oldid=prev"/>
				<updated>2009-01-18T11:50:02Z</updated>
		
		<summary type="html">&lt;p&gt;fixed links&lt;/p&gt;
&lt;table class='diff diff-contentalign-left'&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
				&lt;col class='diff-marker' /&gt;
				&lt;col class='diff-content' /&gt;
			&lt;tr style='vertical-align: top;'&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;← Older revision&lt;/td&gt;
			&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 11:50, 18 January 2009&lt;/td&gt;
			&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Prerequisites ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Prerequisites ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Set up your applet directory and create a &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file as described in the [[../ | &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;main &lt;/del&gt;tutorial]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Set up your applet directory and create a &amp;lt;tt&amp;gt;metadata.desktop&amp;lt;/tt&amp;gt; file as described in the [[../&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;GettingStarted &lt;/ins&gt;| &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Getting Started &lt;/ins&gt;tutorial]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== The 'main.py' file ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== The 'main.py' file ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 49:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a Plasma.Label. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Next we create a Plasma.Label. This is a widget that is Plasma aware and therefore uses all of the goodies provided by Plasma. For example, automatically changing its text color if the Plasma theme changes. We then use the &amp;lt;tt&amp;gt;setText()&amp;lt;/tt&amp;gt; method (analogous to the normal &amp;lt;tt&amp;gt;QLabel.setText()&amp;lt;/tt&amp;gt; method) to set our label text (&amp;quot;Hello, world!&amp;quot;) and then add the label to the layout. Finally we resize the applet to 125 x 125 pixels. &amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once packaged and installed (see [[../ | the &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;main &lt;/del&gt;tutorial]]), the Plasmoid will look like this:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Once packaged and installed (see [[../&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;GettingStarted &lt;/ins&gt;| the &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;Getting Started &lt;/ins&gt;tutorial]]), the Plasmoid will look like this:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:Helloworld.png|center]]&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;&amp;#160;&lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;[[Image:Helloworld.png|center]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Sedwards</name></author>	</entry>

	</feed>