[PyQt] TypeError: type 'str' is not supported as a pyqtSignal() type argument type
Demetrius Cassidy
dcassidy36 at mass.rr.com
Fri Jul 30 23:29:33 BST 2010
I believe the single quotes would return a python str object. Now that I
think about it you are correct that string itself is not a type. But you
should be able pass a string instead of another object to get the same
results. At least that always worked for me prior to this release.
These fail:
>>> pyqtSignal('str')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: type 'str' is not supported as a pyqtSignal() type argument type
>>> pyqtSignal('list')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: type 'str' is not supported as a pyqtSignal() type argument type
But these work:
>>> pyqtSignal(str)
<unbound signal >
>>> pyqtSignal(list)
<unbound signal >
>>>
I am not sure if the above was working due to a bug that was fixed, or if
this change was intentional?
Phil Thompson-5 wrote:
>
> On Fri, 30 Jul 2010 13:54:06 -0700 (PDT), Demetrius Cassidy
> <dcassidy36 at mass.rr.com> wrote:
>> I am not sure why 'string' is no longer allowed in pyqtSignal. I tried
>> using
>> the latest 4.7.5 snapshot, but this line below throws a type error:
>>
>> pyqtSignal('string', 'string')
>>
>>
>> This was working fine as of 4.7.2 - any ideas?
>
> I don't see how that could ever have worked as 'string' is not the name of
> a type.
>
> Phil
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
>
--
View this message in context: http://old.nabble.com/TypeError%3A-type-%27str%27-is-not-supported-as-a-pyqtSignal%28%29-type-argument-type-tp29309835p29310401.html
Sent from the PyQt mailing list archive at Nabble.com.
More information about the PyQt
mailing list