[PyQt] QTreeWidget - itemClicked

Jose Vargas Paz jpaz at aqpglug.org.pe
Fri Jun 25 01:13:30 BST 2010


have a problem with SLOT,
el slot se activa muchas veces
this is my code:

def add_item(self):
        mdi = self.mdiArea.activeSubWindow()
        mdi.setWindowModified(True)
        tree = mdi.widget().treeRequirements
        item = QTreeWidgetItem (tree)
        item.setText (0, str("item"))
        self.connect(tree, SIGNAL("itemClicked(QTreeWidgetItem *, int)"),
self.show_widget)


if I have five items in my QTreeWidget and I click one of them, the slot
"show_widget" also runs five times


-- 
Jose Vargas Paz
  AKA:   ejosvp
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20100624/6d03421c/attachment.html>


More information about the PyQt mailing list