[PyQt] QSortFilterProxyModel with 'fixed' item

Saúl Ibarra Corretgé saghul at gmail.com
Thu Sep 16 09:32:14 BST 2010


Hi all,

I'm currently using a subclass of QSortFilterProxyModel to populate a
QComboBox. This is working fine, but I'd like to have a 'fixed' entry
in this combo box. This entry is not present on the proxy model nor on
the source model, it guess it has to be 'invented' by the proxy model
so it's delivered to the view.

I've been playing around with rowCount and data functions (so it'll
return the real value + 1) and I suspect the key here are
mapFromSource and mapToSource but I'm unable to get this working :-S

Any hint on this would be appreciated.


Regards,

-- 
/Saúl
http://saghul.net | http://sipdoc.net


More information about the PyQt mailing list