[PyQt] PyQt. How to shoot yourself in the foot.

Andrei Kopats hlamer at tut.by
Sun Aug 24 17:10:25 BST 2014

On Sun, Aug 24, 2014 at 5:47 PM, Yuya Nishihara <yuya at tcha.org> wrote:

> I can't tell you why this example raises "C++ object deleted" error.  It
> worked
> as expected with old-style connection:
>    QTimer.singleShot(1000, lineEdit, SLOT('selectAll()'))
> But I guess real-world cases of "C++ object deleted" error are caused by
> different reason than this example.

Of course I can't be absolutely sure what causes the crashes. But on real
word Enki Editor I had a few situations when application either crashed or
generated RuntimeError. If an exception were generated, a backtrace was
just like in my small example. And after I forced signals disconnection
either crashes and exceptions disappeared.

Yuya, thank you for information about old style signals and slots. I
checked it and found that I don't have any exceptions either on PyQt and
PySide. So I updated the article and mentioned you in the text. I hope you
don't mind.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20140824/b4d640f1/attachment-0001.html>

More information about the PyQt mailing list