[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] causes self to be owned by Qt instead of PyQt ???
From: redstone-cold <redstone-cold () 163 ! com>
Date: 2015-04-02 5:05:13
Message-ID: 24a3709b.247.14c7884d6b2.Coremail.redstone-cold () 163 ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
[Attachment #4 (text/plain)]
> > 2)In the doc of sip.setdestroyonexit(destroy) says, "Calling this
> > function with a value of False disables the automatic destruction of
> > C++ instances and C structures(owned by Python)." ,then which is
> > responsible for destroying these C++ instances and C structures? the
> > dtor of them ?
>
> Nothing destroys them, the dtors never get called.
>
> 1)Then on application existing ,who destroys them ?
As I said - nothing, the dtors never get called.
1)Does this mean these C++ instances and C structures still exist in memory even when \
application existed ?
----------------------------------------------------------------------------------------------------------------------------------
> 3)Can you explain why Python has stopped working in this issue ?
> http://www.riverbankcomputing.com/pipermail/pyqt/2015-March/035730.html
No.
> Any way to solve the problem ?
> if we solve the problem via sip.setdestroyonexit(False), then I
> tested on Windows that the system tray icon doesn't disappear right away as
> application exists .
>
2)Is this a bug with PyQt ?
----------------------------------------------------------------------------------------------------------------------------------
> 4)bug report : QFileSystemModel.parent() doesn't exist ,but it should
> have one according to the Qt doc.
It does exist.
3)Have you tested it ? I tested in PyQt4 that QFileSystemModel.parent() doesn't work \
.
----------------------------------------------------------------------------------------------------------------------------------
在2015年04月01 21时48分, "Phil Thompson"<phil@riverbankcomputing.com>写道:
On 01/04/2015 2:19 pm, redstone-cold wrote:
> > 2)In the doc of sip.setdestroyonexit(destroy) says, "Calling this
> > function with a value of False disables the automatic destruction of
> > C++ instances and C structures(owned by Python)." ,then which is
> > responsible for destroying these C++ instances and C structures? the
> > dtor of them ?
>
> Nothing destroys them, the dtors never get called.
> ----------------------------------------------------------------------------------------------------------------------------------
> 1)Then on application existing ,who destroys them ?
As I said - nothing, the dtors never get called.
>
>
> 2)Since sip.setdestroyonexit(True) may cause memory faults, why not
> make sip.setdestroyonexit(False) be the default.
Backwards compatibility. False is the default for PyQt5.
>
>
> 3)Can you explain why Python has stopped working in this issue ?
> http://www.riverbankcomputing.com/pipermail/pyqt/2015-March/035730.html
No.
> Any way to solve the problem ?
> if we solve the problem via sip.setdestroyonexit(False), then I
> tested that the system tray icon doesn't disappear right away as
> application exists .
>
>
>
>
> 4)bug report : QFileSystemModel.parent() doesn't exist ,but it should
> have one according to the Qt doc.
It does exist.
> QAbstractTableModel also has the same bug.
Phil
[Attachment #5 (text/html)]
<div><div style="color: rgb(0, 0, 0); font-family: arial; font-size: \
14px;"><br></div><div><div>>> 2)In the doc of sip.setdestroyonexit(destroy) \
says, "Calling this</div><div>>> function with a value of False disables the \
automatic destruction of</div><div>>> C++ instances and C structures(owned by \
Python)." ,then which is</div><div>>> responsible for destroying these C++ \
instances and C structures? the</div><div>>> dtor of them \
?</div><div>> </div><div>> Nothing destroys them, the dtors never get \
called.</div><div>> </div><div>> 1)Then on application existing ,who \
destroys them ?</div><div><br></div><div>As I said - nothing, the dtors never get \
called.</div><div><br></div><div><br></div><div>1)Does this mean these C++ instances \
and C structures still exist in memory even when application existed \
?</div><div>-------------------------------------------------------------------------- \
--------------------------------------------------------</div><div><br></div><div><br></div><div><br></div><div>> \
3)Can you explain why Python has stopped working in this issue ?</div><div>> \
http://www.riverbankcomputing.com/pipermail/pyqt/2015-March/035730.html</div><div><br></div><div>No.</div><div><br></div><div>> \
Any way to solve the problem ?</div><div><strong>> if we solve the problem via \
sip.setdestroyonexit(False), then I</strong></div><div><strong>> tested on \
Windows that the system tray icon doesn't disappear right away \
as</strong></div><div><strong>> application exists \
.</strong></div><div>> </div><div><br></div><div>2)Is this a bug with PyQt \
?</div><div>-------------------------------------------------------------------------- \
--------------------------------------------------------</div><div><br></div><div>> \
4)bug report : QFileSystemModel.parent() doesn't exist ,but it should</div><div>> \
have one according to the Qt doc.</div><div><br></div><div>It does \
exist.</div><div><br></div><div>3)Have you tested it ? I tested in PyQt4 that \
QFileSystemModel.parent() doesn't work \
.</div><div>----------------------------------------------------------------------------------------------------------------------------------</div></div><div \
style="color: rgb(0, 0, 0); font-family: arial; font-size: 14px;"><br></div><div \
style="color: rgb(0, 0, 0); font-family: arial; font-size: 14px;"><br></div><div \
style="color: rgb(0, 0, 0); font-family: arial; font-size: \
14px;"><br></div></div><!-- jy5ContentSuffix --><div>在2015年04月01 21时48分, \
"Phil Thompson"<phil@riverbankcomputing.com>写道:</div><blockquote \
id="isReplyContent" style="padding-left:1ex; margin: 0px 0px 0px 0.8ex; BORDER-LEFT: \
#ccc 1px solid"><br>On 01/04/2015 2:19 pm, redstone-cold wrote:<br>>> 2)In the \
doc of sip.setdestroyonexit(destroy) says, "Calling this<br>>> function with a \
value of False disables the automatic destruction of<br>>> C++ instances and C \
structures(owned by Python)." ,then which is<br>>> responsible for destroying \
these C++ instances and C structures? the<br>>> dtor of them ?<br>> <br>> \
Nothing destroys them, the dtors never get called.<br>> \
----------------------------------------------------------------------------------------------------------------------------------<br>> \
1)Then on application existing ,who destroys them ?<br><br>As I said - nothing, the \
dtors never get called.<br><br>> <br>> <br>> 2)Since \
sip.setdestroyonexit(True) may cause memory faults, why not<br>> make \
sip.setdestroyonexit(False) be the default.<br><br>Backwards compatibility. False is \
the default for PyQt5.<br><br>> <br>> <br>> 3)Can you explain why Python has \
stopped working in this issue ?<br>> \
http://www.riverbankcomputing.com/pipermail/pyqt/2015-March/035730.html<br><br>No.<br><br>> \
Any way to solve the problem ?<br>> if we solve the problem via \
sip.setdestroyonexit(False), then I<br>> tested that the system tray icon \
doesn't disappear right away as<br>> application exists .<br>> <br>> \
<br>> <br>> <br>> 4)bug report : QFileSystemModel.parent() doesn't exist \
,but it should<br>> have one according to the Qt doc.<br><br>It does \
exist.<br><br>> QAbstractTableModel also has the same \
bug.<br><br>Phil<br></blockquote><br><br><span title="neteasefooter"><span \
id="netease_mail_footer"></span></span>
[Attachment #6 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic