Description
QComboBox crashes when inserting a custom Python user data type:
On Linux, qt 5.11, pyside2 latest git branch 5.11.
from PySide2 import QtWidgets class Data(object): """ Test class to store in userData. The _getitem_ is needed in order to reproduce the segmentation fault. """ def _getitem_(self, item): raise ValueError("Failing") qapp = QtWidgets.QApplication.instance() if qapp is None: qapp = QtWidgets.QApplication(['']) data1 = Data() widget = QtWidgets.QComboBox() widget.addItem('a', data1)
Taken from https://github.com/spyder-ide/qtpy/blob/master/qtpy/tests/test_patch_qcombobox.py
There are many reports for QComboBox, none look like this one.