<div>Thank you very much Vincent, your second option using another signal "itemSelectionChanged()" worked very well, so I can use that to perform other actions.</div>
<div> </div>
<div>However, I still cannot get the "itemClicked(QTreeWidgetItem*)" to work (or "itemDoubleClicked..."), even with sending the column (int) in addition, which should not be necessary in PyQt.</div>
<div> </div>
<div>Appreciate more help on this, but not critical for now with Vincent's suggestion.</div>
<div> </div>
<div>Regards,</div>
<div>Bjorn<br><br></div>
<div class="gmail_quote">On Tue, Apr 13, 2010 at 10:35 PM, Vincent Vande Vyvre <span dir="ltr"><<a href="mailto:vincent.vandevyvre@swing.be">vincent.vandevyvre@swing.be</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div text="#000000" bgcolor="#ffffff">Try with "itemClicked(QTreeWidgetItem*, int)<br><br>also:<br><br> self.connect(self.projectTree,<br> SIGNAL("itemSelectionChanged()"),<br> self.showEvents)<br>
<br> def showEvents(self):<br> item = self.projectTree.currentItem()<br><br>Bjorn Egil Ludvigsen a écrit :
<blockquote type="cite">
<div>
<div></div>
<div class="h5">
<div>Hi, </div>
<div> </div>
<div>I cannot get any signal from QTreeWidget and wonder if anyone have any idea of where to look?</div>
<div> </div>
<div>I have a QMainWindow with a QTabWidget and some QDockWidgets. A QTreeWidget is added to the dockwidget. After successfully populating all tables and the tree with data, I want to click on certain items in the tree to select data and set focus on a particular table. When I click in the tree it looks like items are selected (background color is set), but I am not able to get any actions out of it.</div>
<div> </div>
<div>To debug I am checking to see if items are clicked:</div>
<div> </div>
<div> self.connect(self.uncertaintyTable, <br> SIGNAL("itemDoubleClicked(QTableWidgetItem*)"), self.debug1)<br> self.connect(self.projectTree, <br> SIGNAL("itemClicked(QTreeWidgetItem*)"), <br>
self.showEvents)</div>
<div>.</div>
<div>.</div>
<div>.</div>
<div>.</div>
<div> def debug1(self):<br> self.logMessages.addItem("Uncertainty table item double clicked") <br> def showEvents(self):<br> self.logMessages.addItem("tree item clicked")</div>
<div> </div>
<div>For the table I successfully see the text that the item was clicked (or double clicked), but for the tree I cannot get anything to work.</div>
<div> </div>
<div>Regards,</div>
<div>Bjorn</div></div></div><pre><hr size="4" width="90%">
_______________________________________________
PyQt mailing list <a href="mailto:PyQt@riverbankcomputing.com" target="_blank">PyQt@riverbankcomputing.com</a>
<a href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt" target="_blank">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre></blockquote><br>
<div>-- <br>Vincent V.V. <br></div></div><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>
</blockquote></div><br>