[PyQt] TypeError: type 'str' is not supported as a pyqtSignal() type argument type
Phil Thompson
phil at riverbankcomputing.com
Sat Jul 31 09:23:42 BST 2010
On Fri, 30 Jul 2010 15:29:33 -0700 (PDT), Demetrius Cassidy
<dcassidy36 at mass.rr.com> wrote:
> 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?
Either way, the current behaviour is correct.
Phil
More information about the PyQt
mailing list