[PyQt] qabstractitemmodel + qsortfilterproxymodel

luigi curzi luigi_curzi at yahoo.it
Thu Sep 10 14:31:17 BST 2009


hello,
i created a qtreeview and a qabstractitemmodel; to sort and
filter data i used qsortfilterproxymodel and linked abstarctitemmodel
-> proxymodel -> qtreeview; the problem is that i often add and remove
rows in the model (by means of signal/slot between qtreeview and
abstractmodel); without proxymodel, application works, but with
proxymodel as "wrapper", when rows are inserted, application crashes
(segmentation fault); must i subclass qsortfilterproxymodel
and reimplement maptosource and mapfromsource? how? must i reimplement
other functions? are there some examples? must i emit these signals
"rowsAboutToBeInserted", "rowsInserted" or "layoutChanged" in
qabstractitemmodel?

excuse me for my poor english and thanks in advice.
Luigi 
-- 
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
Io sono 
lo sbaglio, il momento di confusione, l'inopportuno

		Non sono niente.
	      Non sarò mai niente.
	Non posso volere d'essere niente.
A parte questo, ho in me tutti i sogni del mondo.

					F. Pessoa
~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*



More information about the PyQt mailing list