[PyQt] QTreeWidget.takeChild Segfaults

Jan Kaluza hanzz.k at gmail.com
Tue Jul 17 07:17:45 BST 2007


Hi,
i'm trying to remove some subitems from one of my item in QTreeWidget, but on 
_some_ machines it segfaults. Does anybody know, if is something wrong in 
this code?

def on_DeleteContact(self,jid):
	# delete contact from roster
	log.msg("delete contact")
	items=self.findItems(unicode(jid), QtCore.Qt.MatchFixedString |
QtCore.Qt.MatchRecursive,4)
	for item in items:
		log.msg("DELETE ITEM:"+unicode(item.text(1)))
		parent=item.parent()
		parent.takeChild(parent.indexOfChild(item))


More information about the PyQt mailing list