<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 2/21/2013 12:52 PM, Zak wrote:<br>
</div>
<blockquote cite="mid:51265ECD.9000406@m.allo.ws" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<div class="moz-cite-prefix">The following idea helped me with a
different glitch that was probably unrelated to yours, but who
knows, it might help you. Try each of the following:<br>
<br>
<tt># Signals and slots example<br>
# From qt_webview_play.py<br>
<br>
@Slot(bool) # bool is PySide.QtCore.bool<br>
def my_slot(input_bool):<br>
pass<br>
<br>
# The following three lines should be equivalent, but they <br>
# are not always equivalent in practice:<br>
<br>
q_widget.connect(q_widget, SIGNAL("toggled(bool)"), my_slot)<br>
q_widget.toggled.connect(my_slot)<br>
q_widget.toggled[bool].connect(my_slot)<br>
</tt><br>
I don't know why they are different, but sometimes they are. My
bug arose when I tried to manually disconnect and reconnect
signals, specifically the loadFinished(bool) signal on a
QWebView widget.<br>
<br>
In my own experience, it is best to always use the first method,
with SIGNAL("toggled(bool)"). I notice that the StackOverflow
question you linked uses the third method. Try switching it up
and see if anything helps.<br>
</div>
</blockquote>
<br>
Thanks for your comments. I think they were helpful, but the bug
reproduction process here got pretty weird as I fiddle with this
some more. I commonly use method 2 to connect signals and slots (I
wasn't aware of method 3, but I think I see it's necessity at
times). I changed the one connection to use method 1 and sure
enough I think I don't get that failure any more.<br>
<br>
(and now just a personal tale of woe this has led me down ...)
However, I now see that regardless of signal/slot issues, that if I
sit here and open,close,reopen and repeat continuously I'm sure to
get signal/slot failures and missing attributes and even segfault
crashes sometime in the first 30 open/close iterations.
Unfortunately, this widget that I'm closing and reopening has nested
sub-widgets probably 4 layers deep and many many nuances. It will
take a while to decode this, but it certainly looks like memory
corruption. I'm not going to hazard a guess about where to point a
finger at this point aside to say that pure python pyside shouldn't
segfault.<br>
<br>
For the record ... I'm on win 7 32 bit; PySide 1.1.2; python 2.7.3;
Qt 4.8.2.<br>
<br>
Joel<br>
<br>
</body>
</html>