Important: Please read the Qt Code of Conduct -

Subclassed QStandardItem does not receive any signal when it is checked in tree view

  • Hey I have a QTreeView in which I have a tree that stores a list of vector an d raster files.I m using QStandardItem model and I have subclasse QStandardItem as "myQStandardItem" because I wanted each myQStandardItem to have a list of corresponding QGraphicLineItems..Whenever an item(myQStandardItem) is clicked in treeView i want corresponding QgraphicLineItems to be displayed.

    I m using

    void Visualizer::on_treeView_clicked(QModelIndex index)
    myQStandardItem *item1 =standardModel->itemFromIndex(index);

    the problem is that 'standardModel->itemFromIndex(index)' returns pointer to QStandardItem and not myQStandaradItem...When item in treeview is clicked i want to get that myQStandardItem and display corresponding QGraphicsItems....
    plz help me to fix this!

    [edit: please use @-code tags for code, Eddy]

  • sorry it is


Log in to reply