Bug #1158
closedWStandardItem::takeChild() does not propagate signals
0%
Description
I use an WStandardItemModel for the data i received from an .csv file.
Then, i create an WSortFilterProxyModel to set as Model for a tree,
an get the data in it (with setSourceModel())
following my sample pseudo code:
WStandardItemModel *fileModel = new WStandardItemModel();
readFromCsv(f, fileModel); // fills the ItemModel
m_fileProxyModel = new Wt::WSortFilterProxyModel(this);
m_fileProxyModel->setSourceModel(fileModel);
m_tree->setModel(m_fileProxyModel);
Dynamically i read the .csv file to check if there are any changes,
if an item is added, i just set it in my ItemModel:
m_fileModel->setItem(idx_row, idx_col, item);
and the tree is updated with the new information, without refreshing or something
If an .cvs entry is removed, i try to delete if from my model using "takeItem()"
WStandardItem *toRemove = m_fileModel->takeItem(idx_row, idx_col);
delete toRemove;
But this doesn't effect the tree (if it is the second col)?
If needed, i can provide my full example code and the .csv file
Files
Updated by Koen Deforche almost 13 years ago
- Status changed from New to InProgress
- Assignee set to Pieter Libin
- Target version set to 3.2.1
Pieter,
For this bug, WStandardItem::takeChild() should fire the appropriate signals.
Regards,
koen
Updated by Pieter Libin almost 13 years ago
Example code to reproduce the problem.
Updated by Pieter Libin almost 13 years ago
- Status changed from InProgress to Resolved