Hi MAtthieu, I can reproduce your bug
Could you try to make a simpler version of your code ? Sometimes, it helps to sort out other causes of error (I had my share of dangling pointer with PySide...) Stefan On Fri, 8 Aug 2014 12:06:58 +0200 Matthieu Cadet <[email protected]> wrote: > Hi > > As I didn't get answer yet, I've also post a question on StackOverflow > > http://stackoverflow.com/questions/24995936/pyside-qsortfilterproxymodel-and-qlistview-indexwidget-pointer-get-deleted-w > > Someone has test the code on Windows 7 with PySide 1.2.2 and Python 3.3 and > says it works for him without RuntimeError message.... > > I'm still trying to find a solution to this problem :P > > > > On Mon, Jul 28, 2014 at 2:26 PM, Matthieu Cadet <[email protected]> > wrote: > > > Hi PySide guru's > > > > I've a problem with a custom QListView I'm trying to make, here the > > problem: > > > > I'm using QListView to show a list of QWidget object by using > > QListView.setIndexWidget(), > > this works pretty fine, but now I want to filter the item model by > > using QSortFilterProxyModel() > > with .setFilterWildcard() it is not working very well because the second > > time the model is filtered > > I got error like this : > > > > *RuntimeError: Internal C++ object (PySide.QtGui.QLabel) already deleted.* > > > > Without using filtering and QSortFilterProxyModel everything works fine, > > but it seems I'm missing > > something with the filtering operation, the indexWidget() is deleted when > > using filtering :( > > > > here a sample code where you can reproduce the bug, when list view is > > shown, hit 1,2 or 3 keyboard > > key to activate filtering ( Backspace to set filtering empty to show all > > items ) > > > > *https://gist.github.com/66e29df303d1f1825a53.git > > <https://gist.github.com/66e29df303d1f1825a53.git>* > > > > > > Can someone please help me on this? is this a known bug ? or I'm doing it > > completely wrong :P > > > > Thanks in advance for your help. > > > > -- > > Matthieu Cadet > > > > > > -- > Matthieu Cadet > Compositor Artist & TD, > nWave Digital > [email protected] -- Timeo Danaos et dona ferentes Twitter : @Arakowa1 _______________________________________________ PySide mailing list [email protected] http://lists.qt-project.org/mailman/listinfo/pyside
