Feature #3513
closedProvide WIdentityProxyModel in Wt
0%
Description
Dear devs,
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.
Best Regards,
Jan
Files
Updated by Koen Deforche over 10 years ago
- Status changed from New to InProgress
- Assignee set to Roel Standaert
- Target version set to 3.3.4
Updated by Roel Standaert about 10 years ago
- Status changed from InProgress to Resolved
Updated by Koen Deforche about 10 years ago
- Status changed from Resolved to Closed