<div>Haven&#39;t tried it yet, but read about it and will go there later.</div>
<div> </div>
<div>Thanks,</div>
<div>Bjorn<br><br></div>
<div class="gmail_quote">On Wed, Apr 14, 2010 at 10:21 AM, Russell Valentine <span dir="ltr">&lt;<a href="mailto:russ@coldstonelabs.org">russ@coldstonelabs.org</a>&gt;</span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">You try the new signals and slots?<br>self.projectTree.itemClicked.connect(self.debug1)<br>
<div>
<div></div>
<div class="h5"><br>On 04/14/10 09:54, Bjorn Egil Ludvigsen wrote:<br>&gt; Thank you very much Vincent, your second option using another signal<br>&gt; &quot;itemSelectionChanged()&quot; worked very well, so I can use that to perform<br>
&gt; other actions.<br>&gt;<br>&gt; However, I still cannot get the &quot;itemClicked(QTreeWidgetItem*)&quot; to work (or<br>&gt; &quot;itemDoubleClicked...&quot;), even with sending the column (int) in addition,<br>&gt; which should not be necessary in PyQt.<br>
&gt;<br>&gt; Appreciate more help on this, but not critical for now with Vincent&#39;s<br>&gt; suggestion.<br>&gt;<br>&gt; Regards,<br>&gt; Bjorn<br>&gt;<br>&gt; On Tue, Apr 13, 2010 at 10:35 PM, Vincent Vande Vyvre &lt;<br>
&gt; <a href="mailto:vincent.vandevyvre@swing.be">vincent.vandevyvre@swing.be</a>&gt; wrote:<br>&gt;<br>&gt;&gt; Try with &quot;itemClicked(QTreeWidgetItem*, int)<br>&gt;&gt;<br>&gt;&gt; also:<br>&gt;&gt;<br>&gt;&gt;         self.connect(self.projectTree,<br>
&gt;&gt;                 SIGNAL(&quot;itemSelectionChanged()&quot;),<br>&gt;&gt;                 self.showEvents)<br>&gt;&gt;<br>&gt;&gt;         def showEvents(self):<br>&gt;&gt;             item = self.projectTree.currentItem()<br>
&gt;&gt;<br>&gt;&gt; Bjorn Egil Ludvigsen a écrit :<br>&gt;&gt;<br>&gt;&gt;   Hi,<br>&gt;&gt;<br>&gt;&gt; I cannot get any signal from QTreeWidget and wonder if anyone have any idea<br>&gt;&gt; of where to look?<br>&gt;&gt;<br>
&gt;&gt; I have a QMainWindow with a QTabWidget and some QDockWidgets. A QTreeWidget<br>&gt;&gt; is added to the dockwidget. After successfully populating all tables and the<br>&gt;&gt; tree with data, I want to click on certain items in the tree to select data<br>
&gt;&gt; and set focus on a particular table. When I click in the tree it looks like<br>&gt;&gt; items are selected (background color is set), but I am not able to get any<br>&gt;&gt; actions out of it.<br>&gt;&gt;<br>&gt;&gt; To debug I am checking to see if items are clicked:<br>
&gt;&gt;<br>&gt;&gt;         self.connect(self.uncertaintyTable,<br>&gt;&gt;                 SIGNAL(&quot;itemDoubleClicked(QTableWidgetItem*)&quot;),<br>&gt;&gt; self.debug1)<br>&gt;&gt;         self.connect(self.projectTree,<br>
&gt;&gt;                 SIGNAL(&quot;itemClicked(QTreeWidgetItem*)&quot;),<br>&gt;&gt;                 self.showEvents)<br>&gt;&gt; .<br>&gt;&gt; .<br>&gt;&gt; .<br>&gt;&gt; .<br>&gt;&gt;     def debug1(self):<br>&gt;&gt;         self.logMessages.addItem(&quot;Uncertainty table item double<br>
&gt;&gt; clicked&quot;)<br>&gt;&gt;     def showEvents(self):<br>&gt;&gt;         self.logMessages.addItem(&quot;tree item clicked&quot;)<br>&gt;&gt;<br>&gt;&gt; For the table I successfully see the text that the item was clicked (or<br>
&gt;&gt; double clicked), but for the tree I cannot get anything to work.<br>&gt;&gt;<br>&gt;&gt; Regards,<br>&gt;&gt; Bjorn<br>&gt;&gt;<br>_______________________________________________<br>PyQt mailing list    <a href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a><br>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a><br></div></div></blockquote></div><br>