[PySide] PySide Pitfalls

Florian Bruhin me at the-compiler.org
Tue Sep 16 13:38:39 CEST 2014


* Joel B. Mohler <jmohler at gamry.com> [2014-09-16 07:31:28 -0400]:
> On 9/15/2014 10:12 AM, Stephan Deibel wrote:
> > 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.

I already deleted the older mails in this thread, but today I just
stumbled upon http://stackoverflow.com/a/11945184/2085149 which lists
some other common reasons. While the question is for PyQt, the answer
also elaborates on some PySide-specifics.

Sorry if it was already mentioned before.

Florian

-- 
http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
             GPG 0xFD55A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/pyside/attachments/20140916/8947bf9e/attachment.sig>


More information about the PySide mailing list