<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
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
cite="mid:v2y5ec0fe121004131357y571a3b0bjb67f1e08e66ffbff@mail.gmail.com"
type="cite">
<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>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
PyQt mailing list <a class="moz-txt-link-abbreviated" href="mailto:PyQt@riverbankcomputing.com">PyQt@riverbankcomputing.com</a>
<a class="moz-txt-link-freetext" href="http://www.riverbankcomputing.com/mailman/listinfo/pyqt">http://www.riverbankcomputing.com/mailman/listinfo/pyqt</a></pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
Vincent V.V. <br>
</div>
</body>
</html>