[PyQt] PyQt. How to shoot yourself in the foot.
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
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the PyQt