WSortFilterProxyModel does not filter
I have a WTableView object connected to a model object of type WSortFilterModel which in turn is connected to an object of type WStandardItemModel. The tableview initially renders the data just fine. But when I try to filter, however, the data disappears from the tableview. Relevant code is below (I use a WTextEdit to input filter data and a WPushButton to trigger the filter on column 5 of in my model):
construction and initialization of filter model:
m_filter_model = new Wt::WSortFilterProxyModel(root())
m_filter_model->setFilterRole(Wt::UserRole); /// btw, i also tried the DisplayRole. same behaviour.
Here I trigger the filter but the data in the view disappears:
m_filter_model~~setFilterRegExp(m_filterEdit~~>text()); // I checked to make sure there is indeed the correct filter text.
Help is appreciated,