You need to insert a column as well. The insertRow which takes a QStandardItem does this automatically.
if (childItemIndex.isValid()) {
isSuccess = model.insertRow(0, childItemIndex); // make a grandchild, but the item does not appear
isSuccess = model.insertColumn(0, childItemIndex); // Need this...
}
if (childItemIndex.isValid()) {
isSuccess = model.insertRow(0, childItemIndex); // make a grandchild, but the item does not appear
isSuccess = model.insertColumn(0, childItemIndex); // Need this...
}
To copy to clipboard, switch view to plain text mode
Bookmarks