<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentkn" style="color: rgb(0, 128, 0); font-weight: bold; "><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentkn" style="color: rgb(0, 128, 0); font-weight: bold; ">Hello All</span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentkn" style="color: rgb(0, 128, 0); font-weight: bold; "><br></span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentkn" style="color: rgb(0, 128, 0); font-weight: bold; ">i'm tring to learn how to use Qthreads inside my app, so i wrote this example :</span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentkn" style="color: rgb(0, 128, 0); font-weight: bold; ">(it print out the text from the lineEdit widget, at any "text-changes")</span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentkn" style="color: rgb(0, 128, 0); font-weight: bold; "><br></span></span></div><div><br></div>import</span><span class="pygment"> </span><span class="pygmentnn" style="color: rgb(0, 0, 255); font-weight: bold; ">sys</span><span class="pygment"></span>
<span class="pygmentkn" style="color: rgb(0, 128, 0); font-weight: bold; ">from</span><span class="pygment"> </span><span class="pygmentnn" style="color: rgb(0, 0, 255); font-weight: bold; ">PyQt4</span><span class="pygment"> </span><span class="pygmentkn" style="color: rgb(0, 128, 0); font-weight: bold; ">import</span><span class="pygment"> </span><span class="pygmentn">QtCore</span><span class="pygmentp">,</span><span class="pygment"> </span><span class="pygmentn">QtGui</span><span class="pygment"></span>
<span class="pygmentkn" style="color: rgb(0, 128, 0); font-weight: bold; ">import</span><span class="pygment"> </span><span class="pygmentnn" style="color: rgb(0, 0, 255); font-weight: bold; ">time</span><span class="pygment"></span>
<span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">class</span><span class="pygment"> </span><span class="pygmentnc" style="color: rgb(0, 0, 255); font-weight: bold; ">Gui</span><span class="pygmentp">(</span><span class="pygmentn">QtGui</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">QWidget</span><span class="pygmentp">):</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">def</span><span class="pygment"> </span><span class="pygmentnf" style="color: rgb(0, 0, 255); ">__init__</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmentp">,</span><span class="pygment"> </span><span class="pygmentn">parent</span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">None</span><span class="pygmentp">):</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">QtGui</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">QGroupBox</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">__init__</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmentp">,</span><span class="pygment"> </span><span class="pygmentn">parent</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">gcenter</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentn">QtGui</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">QPushButton</span><span class="pygmentp">(</span><span class="pygments" style="color: rgb(186, 33, 33); ">"X"</span><span class="pygmentp">,</span><span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">textout</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentn">QtGui</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">QLineEdit</span><span class="pygmentp">(</span><span class="pygments" style="color: rgb(186, 33, 33); ">"default"</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">textout2</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentn">QtGui</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">QLineEdit</span><span class="pygmentp">(</span><span class="pygments" style="color: rgb(186, 33, 33); ">""</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">guiLayout</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentn">QtGui</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">QGridLayout</span><span class="pygmentp">()</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">guiLayout</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">addWidget</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">gcenter</span><span class="pygmentp">,</span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">1</span><span class="pygmentp">,</span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">0</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">guiLayout</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">addWidget</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">textout</span><span class="pygmentp">,</span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">1</span><span class="pygmentp">,</span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">1</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">setLayout</span><span class="pygmentp">(</span><span class="pygmentn">guiLayout</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">thread</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentn">logJ</span><span class="pygmentp">()</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">thread</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">start</span><span class="pygmentp">()</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">connect</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">gcenter</span><span class="pygmentp">,</span><span class="pygment"> </span><span class="pygmentn">QtCore</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">SIGNAL</span><span class="pygmentp">(</span><span class="pygments" style="color: rgb(186, 33, 33); ">"clicked()"</span><span class="pygmentp">),</span><span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">thread</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">toggle</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">connect</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">textout</span><span class="pygmentp">,</span><span class="pygment"> </span><span class="pygmentn">QtCore</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">SIGNAL</span><span class="pygmentp">(</span><span class="pygments" style="color: rgb(186, 33, 33); ">"textChanged(QString)"</span><span class="pygmentp">),</span><span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">thread</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">setValue</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span>
<span class="pygment"> </span>
<span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">class</span><span class="pygment"> </span><span class="pygmentnc" style="color: rgb(0, 0, 255); font-weight: bold; ">logJ</span><span class="pygmentp">(</span><span class="pygmentn">QtCore</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">QThread</span><span class="pygmentp">):</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">def</span><span class="pygment"> </span><span class="pygmentnf" style="color: rgb(0, 0, 255); ">__init__</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmentp">,</span><span class="pygment"> </span><span class="pygmentn">parent</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">None</span><span class="pygmentp">):</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">QtCore</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">QThread</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">__init__</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmentp">,</span><span class="pygment"> </span><span class="pygmentn">parent</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">value</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">0</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">alive</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">1</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">running</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">0</span><span class="pygment"></span>
<span class="pygment"> </span>
<span class="pygment"> </span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">def</span><span class="pygment"> </span><span class="pygmentnf" style="color: rgb(0, 0, 255); ">run</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmentp">):</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">while</span><span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">alive</span><span class="pygmentp">:</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">while</span><span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">running</span><span class="pygmentp">:</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">try</span><span class="pygment"> </span><span class="pygmentp">:</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">a</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">aggiorna</span><span class="pygmentp">()</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentc" style="color: rgb(64, 128, 128); font-style: italic; ">#startj(0,0)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">print</span><span class="pygment"> </span><span class="pygmentn">a</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">time</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">sleep</span><span class="pygmentp">(</span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">1</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">except</span><span class="pygment"> </span><span class="pygmentp">:</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">print</span><span class="pygment"> </span><span class="pygments" style="color: rgb(186, 33, 33); ">'exit from Joy mode'</span><span class="pygment"></span>
<span class="pygment"> </span>
<span class="pygment"> </span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">def</span><span class="pygment"> </span><span class="pygmentnf" style="color: rgb(0, 0, 255); ">toggle</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmentp">):</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">if</span><span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">running</span><span class="pygmentp">:</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">running</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">0</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">else</span><span class="pygment"> </span><span class="pygmentp">:</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">running</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">1</span><span class="pygment"></span>
<span class="pygment"> </span>
<span class="pygment"> </span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">def</span><span class="pygment"> </span><span class="pygmentnf" style="color: rgb(0, 0, 255); ">stop</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmentp">):</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">alive</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">0</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">running</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentmi" style="color: rgb(102, 102, 102); ">0</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">wait</span><span class="pygmentp">()</span><span class="pygment"></span>
<span class="pygment"> </span>
<span class="pygment"> </span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">def</span><span class="pygment"> </span><span class="pygmentnf" style="color: rgb(0, 0, 255); ">setValue</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmentp">,</span><span class="pygment"> </span><span class="pygmentn">value</span><span class="pygmentp">):</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">value</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentn">value</span><span class="pygment"></span>
<span class="pygment"> </span>
<span class="pygment"> </span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">def</span><span class="pygment"> </span><span class="pygmentnf" style="color: rgb(0, 0, 255); ">aggiorna</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmentp">):</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">newvalue</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentnb" style="color: rgb(0, 128, 0); ">str</span><span class="pygmentp">(</span><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">value</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">return</span><span class="pygment"> </span><span class="pygmentn">newvalue</span></span><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentn"></span>
<span class="pygmentk" style="color: rgb(0, 128, 0); font-weight: bold; ">if</span><span class="pygment"> </span><span class="pygmentn">__name__</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">==</span><span class="pygment"> </span><span class="pygments" style="color: rgb(186, 33, 33); ">"__main__"</span><span class="pygmentp">:</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">app</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentn">QtGui</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">QApplication</span><span class="pygmentp">(</span><span class="pygmentn">sys</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">argv</span><span class="pygmentp">)</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">gui</span><span class="pygment"> </span><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span><span class="pygment"> </span><span class="pygmentn">Gui</span><span class="pygmentp">()</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">gui</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">show</span><span class="pygmentp">()</span><span class="pygment"></span>
<span class="pygment"> </span><span class="pygmentn">sys</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">exit</span><span class="pygmentp">(</span><span class="pygmentn">app</span><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span><span class="pygmentn">exec_</span><span class="pygmentp">())</span></span><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp"><br></span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp"><br></span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp"><br></span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp">####################</span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp"><br></span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp">as you can see, it start the thread using the value : 0</span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp"><br></span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp">"</span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentn">value</span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygment"> </span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmento" style="color: rgb(102, 102, 102); ">=</span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygment"> </span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentmi" style="color: rgb(102, 102, 102); ">0</span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">"</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp"><br></span></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp">what i need instead, is to start the thread using the "text" from "</span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentbp" style="color: rgb(0, 128, 0); ">self</span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmento" style="color: rgb(102, 102, 102); ">.</span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentn">textout.text()</span></span><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">"</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><br></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><br></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">have you any hints ?</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><br></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><br></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">thanks a lot for your preciouse help!</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><br></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><br></span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">regards,</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">Massimo.</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 11px; line-height: 13px; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; "><span class="pygmentp"><br></span></span></div></div></body></html>