[PyQt] sip. setdestroyonexit
Zhao Lee
redstone-cold at 163.com
Thu Aug 25 02:40:35 BST 2016
I always wrap the start-up entry in a separate function, typically called main(), and never see the Crashes On Exit error , http://pyqt.sourceforge.net/Docs/PyQt5/gotchas.html#crashes-on-exit
def main():
app = QApplication(sys.argv)
w = QWidget()
w.show()
app.exec()
if __name__ == '__main__':
main()
在2016年08月16 05时35分, "Phil Thompson"<phil at riverbankcomputing.com>写道:
On 15 Aug 2016, at 9:11 pm, Carl Wolff <carl at wolff-online.nl> wrote:
>
> Hello,
>
> I succesfully applied sip. setdestroyonexit on a fairly large pyqt4 application suffering from occasional crashes at exit time.
>
> My question is twofold:
> - why is destroyonexit not set to False by default;
So as not to change the behaviour of existing applications.
> - Is it (theoretically) possible to live without using this sip call? E.g. by adhering to guidelines regarding pyqt wrapper/qt ownership and qt/python garbage collection? When I read the API documentation of sip.setdestroyonexit carefully, I get the impression that it is impossible to live without this sip call.
As far as I can remember I've never used it in my own code.
Phil
_______________________________________________
PyQt mailing list PyQt at riverbankcomputing.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160825/63057f23/attachment-0001.html>
More information about the PyQt
mailing list