Why itemChanged of QStandardItemModel is invoked on all items on my model when creating the QStandardItemModel subclass
-
Hi i have model subclass m_model ( of QStandardItemModel ) it contains QStandardItem's that one of its column has setCheckable(true)
in the subclass in the constructor i have this single/slot wired:
@connect(m_model, SIGNAL(itemChanged(QStandardItem*)), this,
SLOT(tree_itemChanged(QStandardItem*))); @why each time i create the m_model and it happen only once it iterate all the items in my model with the tree_itemChanged method ?
i want it to be invoked only when i check/unchecked the check box. -
bq. why each time i create the m_model and it happen only once it iterate all the items in my model with the tree_itemChanged method ?
i want it to be invoked only when i check/unchecked the check box.If I 'm not wrong you have a QStandardItemModel that you use also for a tree?
What does your SLOT tree_itemChanged do?
You could use a condition to filter only the checked role.Can you elaborate a little more about the structure of your application? Do you use a proxymodel?