[PyQt] Invalid types for qRegisterResourceData
Phil Thompson
phil at riverbankcomputing.com
Fri Sep 9 15:33:28 BST 2016
On 7 Sep 2016, at 10:43 pm, Florian Bruhin <me at the-compiler.org> wrote:
>
> This just came up in the #pyqt IRC channel:
>
> Using qRegisterResourceData with a string says one should use a string
> instead:
>
>>>> from PyQt5.QtCore import qRegisterResourceData
>>>> qRegisterResourceData(0,'x','x','x')
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> TypeError: qRegisterResourceData(int, str, str, str): argument 2 has unexpected type 'str'
>
> Seems like bytes work though:
>
>>>> qRegisterResourceData(0,b'x',b'x',b'x')
> False
It's a sip bug generating the wrong doc string.
Thanks,
Phil
More information about the PyQt
mailing list