Is there a native data model from TreeView in QML?
问题 The QT document had implied that any implementation of QAbstractItemModel can be used for TreeView. These models are usually in C++, which is inconvenient for now. So is there an native QML model which can be utilized in treeview? Can I set a QStandardItemModel model from C++, and use this model in qml? 回答1: The QStandardItemModel reference gives an example of how to use it for a TreeView: QStandardItemModel model; QStandardItem *parentItem = model.invisibleRootItem(); for (int i = 0; i < 4;