Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

QStandardItemModel::removeRows() also deleting corresponding QStandardItems?



  • Hey guys.

    topic says it all basically. I am removing entries in a QStandardItemModel and I am wondering of it does delete the entries at the same time. Like this:

    @
    void foo(){
    ValidModelFromSomewhere->removeRows(0, ValidModelFromSomewhere->rowCount());
    }@

    What if I would use ValidModelFromSomewhere->clear() instead? Would that have the same effect?


Log in to reply