Provide WIdentityProxyModel in Wt
WAbstractProxyModel's index(), parent(), rowCount() and columnCount()
are pure virtuals. The class, though, knows enough about the proxied
model to afford reasonable default implementations of those methods. It
could also forward the proxied model's signals to connected views, but
doesn't. Derived classes have to implement both on their own. I found
that than inconvenient, if not for the work involved, then for the fact
that derived classes might break with signals newly introduced into
future versions of WAbstractProxyModel.
Wondering why that is so, I checked out QAbstractProxyModel and found it
to be implemented similarly. What Qt does provide, however, is a
QIdentityProxyModel that reimplements those methods and does the signal
plumbing for you. If I understood its purpose correctly, it should in
general be used as the base class for home-grown proxy model
implementations. As Wt doesn't have such a beast, I've implemented
and attached one that works for me. Please use it if you find it useful.