Nominate our 2022 Qt Champions!

[Solved] QTreeView CheckBox checked:unchecked signal ?

  • I have a treeView for which i am using a QStandardItemModel, For each QStandardItem i am setting


    This displays a checkbox with the text for the tree nodes. How can i emit a signal when checkbox is checked : unchecked .
    I tried to connect

    @connect(treeModel,SIGNAL(itemChanged(QStandardItem*)),SLOT(onItemChanged(const QStandardItem*)));@

    but this doesnt seems to work.


    Edit : There was a small bug I changed the code to


    now it works :)

Log in to reply