[PyKDE] PyQT Segfault on widget removal.

Vio vmilitaru at sympatico.ca
Wed Jun 18 13:59:01 BST 2003


Henry Kleynhans wrote:

>Hi all,
>
>Ok, the following seems to work ok.
>
>	# Don't do this
>	# self.myParent.removeChild(self.myChild)
>	self.myChild.deleteLater()
>	del self.myChild
>
>  
>
Something seems wrong here: you're deleting the same object twice (hence 
possible cause for a segfault? ... by trying to delete a nonexistant 
object - I donno.). Anyways, just calling :

"self.myChild.deleteLater()"

should do it.

"del self.myChild"

seems redundant. 

Vio





More information about the PyQt mailing list