[PyQt] QSignalSpy with bytes broken in PytQt 5.7

Florian Bruhin me at the-compiler.org
Tue Aug 2 11:33:56 BST 2016

This works fine and prints b'foo' as expected with PyQt 5.6 and
Qt 5.7:

    from PyQt5.QtTest import QSignalSpy
    from PyQt5.QtCore import QCoreApplication, QObject, pyqtSignal

    class Signaller(QObject):
        sig = pyqtSignal(bytes)

    app = QCoreApplication([])
    signaller = Signaller()
    spy = QSignalSpy(signaller.sig)

However, with PyQt 5.7 I get None and this warning:

    QSignalSpy: Unable to handle parameter '' of type 'const char*' of
    method 'sig', use qRegisterMetaType to register it.


http://www.the-compiler.org | me at the-compiler.org (Mail/XMPP)
   GPG: 916E B0C8 FD55 A072 | http://the-compiler.org/pubkey.asc
         I love long mails! | http://email.is-not-s.ms/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160802/f41b1ea0/attachment.sig>

More information about the PyQt mailing list