[PyQt] PyQt 5.11: Connecting to QAbstractItemModel::headerDataChanged fails

Florian Bruhin me at the-compiler.org
Sat Jun 23 16:07:56 BST 2018


Hi,

I did just run my testsuite with PyQt 5.11, and it looks like connecting
to the QAbstractItemModel::headerDataChanged signal fails (which causes
anything using pytest-qt's modeltester[1] to fail):

    >>> from PyQt5.QtGui import QStandardItemModel
    >>> model = QStandardItemModel()
    >>> model.headerDataChanged
    <bound PYQT_SIGNAL headerDataChanged of QStandardItemModel object at 0x7f53e465e438>
    >>> model.headerDataChanged.connect(lambda: None)
    QObject::connect: No such signal QStandardItemModel::headerDataChanged(Orientation,int,int)
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    TypeError: connect() failed between (Qt::Orientation,int,int) and unislot()

The same thing also seems to happen with a @pyqtSlot-decorated slot in a
QObject.

I've also tried somehow getting the correct overload via
headerDataChanged[int, int, int] and [Qt.Orientation, int, int], without
any luck.

Not sure yet whether it's only that signal, or whether it also affects
other signals using enums or so... I've only seen it there so far.

[1] http://pytest-qt.readthedocs.io/en/latest/modeltester.html

Florian

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


More information about the PyQt mailing list