[PyQt] Fwd: Re: Python has stopped working in PyQt application

Baz Walter bazwal at ftml.net
Fri Apr 3 17:08:25 BST 2015


On 03/04/15 06:12, redstone-cold wrote:
>
>
> Thanks very much !
> so this
> self.widget = QtGui.QWidget(self)
> will cause exist crash ,right ?
>

No. The complete opposite of that. It will usually ensure that the 
widget is deleted properly. Qt should delete the C++ part, and Python 
should garbage-collect the rest. Giving the widget a parent is generally 
a good idea, as several people have already told you.

Please take the time to read all the answers you have been given on this 
subject. I don't think there's much else that can be said.

--
Regards
Baz Walter


More information about the PyQt mailing list