[PyQt] Cannot get any SIGNAL from QTreeWidget

Bjorn Egil Ludvigsen bludvigsen at gmail.com
Tue Apr 13 21:57:34 BST 2010


Hi,

I cannot get any signal from QTreeWidget and wonder if anyone have any idea
of where to look?

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.

To debug I am checking to see if items are clicked:

        self.connect(self.uncertaintyTable,
                SIGNAL("itemDoubleClicked(QTableWidgetItem*)"), self.debug1)
        self.connect(self.projectTree,
                SIGNAL("itemClicked(QTreeWidgetItem*)"),
                self.showEvents)
.
.
.
.
    def debug1(self):
        self.logMessages.addItem("Uncertainty table item double clicked")

    def showEvents(self):
        self.logMessages.addItem("tree item clicked")

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.

Regards,
Bjorn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100413/7db5d4b8/attachment.html>


More information about the PyQt mailing list