<meta content="text/html; charset=ISO-8859-1"
<body bgcolor="#FFFFFF" text="#000000">
<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>
<tt># Signals and slots example<br>
# From qt_webview_play.py<br>
@Slot(bool) # bool is PySide.QtCore.bool<br>
# The following three lines should be equivalent, but they <br>
# are not always equivalent in practice:<br>
q_widget.connect(q_widget, SIGNAL("toggled(bool)"), my_slot)<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
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>
On 2/21/13 9:11 AM, Joel B. Mohler wrote:<br>
<blockquote cite="mid:51262B0B.email@example.com" type="cite">
<pre wrap="">Does anyone recognize and know a solution for the "Failed to connect
signal" traceback here? I get this runtime error occasionally.
Invalid Signal signature: toggled(bool)
Traceback (most recent call last):
.... stuff ...
RuntimeError: Failed to connect signal toggled(bool).
I don't have any case that is small enough or public enough to post here
in any detail, but I'm sure I'm not the only one who recognizes this on
sight as the dreaded erratic failure-to-connect bug. I have two
different apps which exhibit the issue (different signals). The
<a class="moz-txt-link-freetext" href="http://stackoverflow.com/questions/8881048/getting-erratic-invalid-signal-signature-errors-in-pyside-qwebpage">http://stackoverflow.com/questions/8881048/getting-erratic-invalid-signal-signature-errors-in-pyside-qwebpage</a>
seems to me to be just as bizarre and surely related to my own conundrums.
Despite all my reluctance to post code, I do have to admit that it is
clear to me that certain signals have it happen and some never do. That
is, I have never seen this error occur for the vast majority of signals
I connect, but there are just a few that it happens on maybe 1 in 20 times.
Any thoughts on this?
PySide mailing list
<a class="moz-txt-link-abbreviated" href="mailto:PySide@qt-project.org">PySide@qt-project.org</a>
<a class="moz-txt-link-freetext" href="http://lists.qt-project.org/mailman/listinfo/pyside">http://lists.qt-project.org/mailman/listinfo/pyside</a>