Description
When calling C++ methods that have default arguments, without specifying the arguments, an error is displayed.
Two examples are from https://codereview.qt-project.org/#/c/164389
Address book tablemodel.py calls self.dataChanged.emit(index, index) on a QAbstractTableModel object, which displays the following error:
Traceback (most recent call last): File "/Users/alex/Dev/pyside/qt-pyside2-setup/sources/pyside2-examples/examples/itemviews/addressbook/addresswidget.py", line 109, in addEntry self.tableModel.setData(ix, address["name"], Qt.EditRole) File "/Users/alex/Dev/pyside/qt-pyside2-setup/sources/pyside2-examples/examples/itemviews/addressbook/tablemodel.py", line 137, in setData self.dataChanged.emit(index, index) TypeError: dataChanged(QModelIndex,QModelIndex,QVector<int>) only accepts 3 arguments, 3 given!
Replacing the code with an explicit argument works though:
self.dataChanged.emit(index, index, 0) -> works
Same thing in self.closeEditor.emit(editor) in QStyledItemDelegate in stardelegate.py:
Traceback (most recent call last):
File "stardelegate/stardelegate.py", line 137, in commitAndCloseEditor
self.closeEditor.emit(editor)
TypeError: closeEditor(QWidget*,QAbstractItemDelegate::EndEditHint) only accepts 2 arguments, 2 given!
Attachments
Issue Links
- is duplicated by
-
PYSIDE-462 optional signal parameters added in Qt5 are not supported
-
- Closed
-