[PySide] PySide Pitfalls

Nicolas Pinault dev at famillepinault.fr
Mon Sep 15 22:26:55 CEST 2014


Le 15/09/2014 16:12, Stephan Deibel a écrit :
> Nathan Warmerdam wrote:
>> TL;DR - What are some common gotchas that can lead to a crash even in
>> a simple PySide application.
> One is trying to keep a reference to any wrapped object that is not a
> descendent of QObject.  There is no life cycle management so the
> underlying C++ object can be freed and the Python reference can even be
> replaced with another C++ object.  I've seen this with QEvents in the
> context of event filters and it also applies to QIcon, QStandardItem,
> and QListWidgetItem, which maybe is a clue to why it crashed in your case.
>
> Not sure if this will be helpful or not but it's worth knowing about...
>
> - Stephan
This article link has been posted here few weeks ago :

http://enki-editor.org/2014/08/23/Pyqt_mem_mgmt.html

Nicolas
>
> _______________________________________________
> PySide mailing list
> PySide at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/pyside




More information about the PySide mailing list