On Sat, 9 Jan 2010 18:34:21 -0800, Karthik Tharavaad
<[email protected]> wrote:
> On Sat, Jan 9, 2010 at 1:29 PM, Phil Thompson
> <[email protected]>wrote:
> 
>> On Sat, 9 Jan 2010 12:03:38 -0800, Karthik Tharavaad
>> <[email protected]> wrote:
>> > Thanks for replying Phil, thats a great point which I didn't think
>> > about.
>> > However 2 points
>> >  - Even if the QWebPage does not parent the QNetworkAccessManager,
>> >  shouldn't
>> > it still hold a reference to it and keep it from getting deleted?
>>
>> Perhaps.
>>
> 
> So I take it that there is a bug with the pyqt or qt framework?

No, the bug is in your code. The issue is whether PyQt can or should work
around your bug. The classic case is setModel() where a lot of people
(understandably) didn't realise that they should keep an explicit reference
to the model because Qt doesn't take ownership of it. PyQt was changed to
work around this (by taking a hidden reference) because it was the
pragmatic (but not "right") thing to do.

This case fails the "pragmatic" case because it isn't a common bug, and
because the workaround wouldn't work - the extra reference would be held by
the page, but you aren't keeping a reference to the page either.

>> >  - Even if the behavior is intended, under no circumstances should my
>> > example program1 crash Python.exe the way it does right now. Is there
>> > something wrong with the error handling code?
>>
>> No - what do you expect to happen?
>>
>>
> I would expect some kind of descriptive error rather than just python.exe
> crashing. Thats usually what happens when I try to do something "bad"

It's Qt that is crashing and PyQt has no way of preventing it or detecting
it.

Phil
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to