PyQt QWidget in QAbstractListModel gets deleted with QSortFilterProxyModel
问题 I need to populate a listview with widgets, then have a custom proxyfilter work with it. Without the filter it works great, when active it seems to delete the widgets attach to the model. It shows up fine showing all items, filtering works but when erasing the filter, when hidden widgets should be shown again following error gets thrown: custom_widget.setGeometry(option.rect) RuntimeError: underlying C/C++ object has been deleted Tried not using QVariant and going the internalPointer route