Is it possible to change a class of a C object to a python subclass?
I am using PyGTK, and I have a ListModel that I have wrapped my own class around, but I want to turn it into a TreeModelFilter. The directions tell me to create it by doing:
class MyListStore(gtk.ListStore):
def __init__(self, title):
self.title = title
liststore = MyListStore(gobject.TYPE_INT, gobject.TYPE_STRING)
modelfilter = liststore.filter_new()
So I thought I could just create:
class MyFilteredListStore(gtk.TreeModelFilter):
def __init__(self, title):
self.title = title
But I don't know how to use filter_new to use my class, instead of gtk.TreeModelFilter.