<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ca">
	<id>https://cacauet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=PyQt4%3A_utilitzant_Qt_Designer</id>
	<title>PyQt4: utilitzant Qt Designer - Historial de revisió</title>
	<link rel="self" type="application/atom+xml" href="https://cacauet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=PyQt4%3A_utilitzant_Qt_Designer"/>
	<link rel="alternate" type="text/html" href="https://cacauet.org/wiki/index.php?title=PyQt4:_utilitzant_Qt_Designer&amp;action=history"/>
	<updated>2026-05-04T09:20:38Z</updated>
	<subtitle>Historial de revisió per a aquesta pàgina del wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://cacauet.org/wiki/index.php?title=PyQt4:_utilitzant_Qt_Designer&amp;diff=1700&amp;oldid=prev</id>
		<title>Enric: /* Instal·lació */</title>
		<link rel="alternate" type="text/html" href="https://cacauet.org/wiki/index.php?title=PyQt4:_utilitzant_Qt_Designer&amp;diff=1700&amp;oldid=prev"/>
		<updated>2013-02-06T20:28:42Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Instal·lació&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 20:28, 6 feb 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l10&quot; &gt;Línia 10:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 10:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&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-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;També ens caldran algunes utilitats per generar el codi en Python:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;També ens caldran algunes utilitats per generar el codi en Python:&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;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  $ sudo apt-get install &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;qt4&lt;/del&gt;-dev-tools&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  $ sudo apt-get install &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;pyqt4&lt;/ins&gt;-dev-tools&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-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;br&amp;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;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&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-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&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-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Introducció ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Introducció ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Enric</name></author>
		
	</entry>
	<entry>
		<id>https://cacauet.org/wiki/index.php?title=PyQt4:_utilitzant_Qt_Designer&amp;diff=1639&amp;oldid=prev</id>
		<title>Enric: Utilitzant QtDesigner amb PyQt4 s'ha reanomenat com PyQt4: utilitzant Qt Designer</title>
		<link rel="alternate" type="text/html" href="https://cacauet.org/wiki/index.php?title=PyQt4:_utilitzant_Qt_Designer&amp;diff=1639&amp;oldid=prev"/>
		<updated>2013-01-21T18:19:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;a href=&quot;/wiki/index.php/Utilitzant_QtDesigner_amb_PyQt4&quot; class=&quot;mw-redirect&quot; title=&quot;Utilitzant QtDesigner amb PyQt4&quot;&gt;Utilitzant QtDesigner amb PyQt4&lt;/a&gt; s&amp;#039;ha reanomenat com &lt;a href=&quot;/wiki/index.php/PyQt4:_utilitzant_Qt_Designer&quot; title=&quot;PyQt4: utilitzant Qt Designer&quot;&gt;PyQt4: utilitzant Qt Designer&lt;/a&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ca&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 18:19, 21 gen 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;ca&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Cap diferència)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Enric</name></author>
		
	</entry>
	<entry>
		<id>https://cacauet.org/wiki/index.php?title=PyQt4:_utilitzant_Qt_Designer&amp;diff=1590&amp;oldid=prev</id>
		<title>Enric a 17:24, 7 gen 2013</title>
		<link rel="alternate" type="text/html" href="https://cacauet.org/wiki/index.php?title=PyQt4:_utilitzant_Qt_Designer&amp;diff=1590&amp;oldid=prev"/>
		<updated>2013-01-07T17:24:59Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ca&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Versió més antiga&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revisió del 17:24, 7 gen 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l16&quot; &gt;Línia 16:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 16:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Introducció ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Introducció ==&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-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;El projecte tindrà 2 parts (3 fitxers):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;El projecte tindrà 2 parts (3 fitxers):&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;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* El formulari/finestra generat amb Qt-Designer amb tots els widgets: test.ui&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;* La part UI generada:&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;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* La classe generada a partir d'aquest: test.py&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/ins&gt;* El formulari/finestra generat amb Qt-Designer amb tots els widgets: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;test.ui&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&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;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;del class=&quot;diffchange diffchange-inline&quot;&gt;El nostre programa amb &lt;/del&gt;la lògica de l'aplicació: run.py&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;*&lt;/ins&gt;* La classe generada a partir d'aquest: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;test.py&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;La part de &lt;/ins&gt;la lògica de l'aplicació: &lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&lt;/ins&gt;run.py&lt;ins class=&quot;diffchange diffchange-inline&quot;&gt;'''&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-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&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-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Per poder executar el widget generat caldrà que heretem la classe generada (important de test.py i de QWidget: herència múltiple!!) i posem l'aplicació en marxa (veure codi al final del tutorial).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Per poder executar el widget generat caldrà que heretem la classe generada (important de test.py i de QWidget: herència múltiple!!) i posem l'aplicació en marxa (veure codi al final del tutorial).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l38&quot; &gt;Línia 38:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Línia 39:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&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-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;−&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del class=&quot;diffchange diffchange-inline&quot;&gt;=&lt;/del&gt;== Codi run.py &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;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Codi run.py ==&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-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Aquí va!!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Aquí va!!&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-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Enric</name></author>
		
	</entry>
	<entry>
		<id>https://cacauet.org/wiki/index.php?title=PyQt4:_utilitzant_Qt_Designer&amp;diff=1589&amp;oldid=prev</id>
		<title>Enric: Es crea la pàgina amb «Qt Desginer és una eina molt potentque ens facilitarà molt la generació d'aplicacions gràfiques amb Qt.  NOTA important: el tutorial està pensat per PyQt4 en GNU/Lin…».</title>
		<link rel="alternate" type="text/html" href="https://cacauet.org/wiki/index.php?title=PyQt4:_utilitzant_Qt_Designer&amp;diff=1589&amp;oldid=prev"/>
		<updated>2013-01-07T17:21:40Z</updated>

		<summary type="html">&lt;p&gt;Es crea la pàgina amb «Qt Desginer és una eina molt potentque ens facilitarà molt la generació d&amp;#039;aplicacions gràfiques amb Qt.  NOTA important: el tutorial està pensat per PyQt4 en GNU/Lin…».&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Pàgina nova&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Qt Desginer és una eina molt potentque ens facilitarà molt la generació d'aplicacions gràfiques amb Qt.&lt;br /&gt;
&lt;br /&gt;
NOTA important: el tutorial està pensat per PyQt4 en GNU/Linux basat en Debian. Qt és una llibreria multiplataforma i l'aplicacíó Qt-Designer està present en diverses plataformes, incloent Windows, però no detallarem les comandes per dur-ho a terme (tot i que no hauria de ser molt diferent que en GNU/Linux)...&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Instal·lació ==&lt;br /&gt;
Per instal·lar-lo:&lt;br /&gt;
 $ sudo apt-get install qt4-designer&lt;br /&gt;
&lt;br /&gt;
També ens caldran algunes utilitats per generar el codi en Python:&lt;br /&gt;
 $ sudo apt-get install qt4-dev-tools&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Introducció ==&lt;br /&gt;
El projecte tindrà 2 parts (3 fitxers):&lt;br /&gt;
* El formulari/finestra generat amb Qt-Designer amb tots els widgets: test.ui&lt;br /&gt;
* La classe generada a partir d'aquest: test.py&lt;br /&gt;
* El nostre programa amb la lògica de l'aplicació: run.py&lt;br /&gt;
&lt;br /&gt;
Per poder executar el widget generat caldrà que heretem la classe generada (important de test.py i de QWidget: herència múltiple!!) i posem l'aplicació en marxa (veure codi al final del tutorial).&lt;br /&gt;
&lt;br /&gt;
Anem al lio...&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Tutorial Qt-Designer amb Python ==&lt;br /&gt;
&lt;br /&gt;
El procés consisteix en:&lt;br /&gt;
# Crear un widget amb Qt-Designer ('''arxiu .ui'''). Fiqueu-li força controladors (sliders, botons, etc.) amb un layout com per exemple un GridLayout, així també observareu com es comporta aquest layout.&amp;lt;pre&amp;gt;graveu l'arxiu test.ui&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: Nota important: cal canviar el nom del widget a &amp;quot;Test&amp;quot; perquè l'exemple funcioni.&lt;br /&gt;
# '''Transformar l'arxiu .ui en un .py''', és a dir, en una classe que puguem heretar i així obtenir els widgets que hem creat: &amp;lt;pre&amp;gt;$ pyuic4 test.ui &amp;gt; test.py&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Ara ja tenim la classe generada. Podem fer un cop d'ull al codi amb: &amp;lt;pre&amp;gt;$ gedit test.py&amp;lt;/pre&amp;gt;&lt;br /&gt;
#: ULL perquè la classe generada s'ha de dir Ui_Test. Si no, l'exemple no funcionarà (després podeu dir-li com vulgueu, òbviament).&lt;br /&gt;
# Fem el nostre codi (on caldrà després implementar la lògica de l'aplicació). En aquest importarem la classe heretada (Ui_Test) en la nostra classe nova (Test). Veure el codi al final del tutorial.&lt;br /&gt;
# Executem l'aplicació:&amp;lt;pre&amp;gt;$ python run.py&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Codi run.py ===&lt;br /&gt;
Aquí va!!&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;python&amp;quot;&amp;gt;&lt;br /&gt;
#!/usr/bin/python&lt;br /&gt;
# -*- coding: utf-8 -*-&lt;br /&gt;
&lt;br /&gt;
from PyQt4 import *&lt;br /&gt;
from test import *&lt;br /&gt;
import sys&lt;br /&gt;
&lt;br /&gt;
class Test(QtGui.QWidget,Ui_Test):&lt;br /&gt;
    def __init__(self, parent=None):&lt;br /&gt;
        QtGui.QWidget.__init__(self,parent)&lt;br /&gt;
        self.setupUi(self)&lt;br /&gt;
&lt;br /&gt;
if __name__ == &amp;quot;__main__&amp;quot;:&lt;br /&gt;
    app = QtGui.QApplication(sys.argv)&lt;br /&gt;
    t = Test()&lt;br /&gt;
    t.show()&lt;br /&gt;
    sys.exit(app.exec_())&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Fixeu-vos en què:&lt;br /&gt;
* La classe Test() té herència múltiple de QWidget i Ui_Test.&lt;br /&gt;
* Cal cridar als constructors respectius. El de la classe UI no es diu init, sinó que es diu setupUI, així no hi ha embolics.&lt;/div&gt;</summary>
		<author><name>Enric</name></author>
		
	</entry>
</feed>