Thanks Phil,<br><br>being able to use any Python type as signal arguments it&#39;s not quite what I expected. I reckon the overlap with the C++ types had me confused then. <br><br>Regards,<br>Rien<br><br><br><div class="gmail_quote">
On Mon, Jun 7, 2010 at 11:43 PM, Phil Thompson <span dir="ltr">&lt;<a href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Mon, 7 Jun 2010 11:47:40 +0200, Rien Korstanje<br>
&lt;<a href="mailto:rien.korstanje@gmail.com">rien.korstanje@gmail.com</a>&gt;<br>
wrote:<br>
<div class="im">&gt; Hello,<br>
&gt;<br>
&gt; I think I have identified an integer roll over issue when using PyQt<br>
slots.<br>
&gt; When passing a python long through a signal it comes out as an int.<br>
Please<br>
&gt; see the example below.<br>
&gt;<br>
&gt; Is this a bug?<br>
<br>
</div>No. The problem is that int/long in Python is not the same as int/long in<br>
C++. The behaviour is chosen to work as expected most of the time, but you<br>
may hit problems when values start to overflow.<br>
<div class="im"><br>
&gt; If so, is there a workaround?<br>
<br>
</div>You need to specify a C++ type (ie. as a string) that is going to be big<br>
enough...<br>
<br>
    barSignal = pyqtSignal(&#39;unsigned long long&#39;)<br>
<br>
If you want to pass Python longs that won&#39;t fit into a C++ type then you<br>
will need to pass them as a Python object...<br>
<br>
    barSignal = pyqtSignal(&#39;PyQt_PyObject&#39;)<br>
<br>
...but that means that you cannot connect to any C++ code that doesn&#39;t<br>
handle a PyQt_PyObject.<br>
<font color="#888888"><br>
Phil<br>
</font></blockquote></div><br>