void MainWindow::expandNode(const QModelIndex &parentIndex, bool expand) {
tree->setExpanded(parentIndex, expand);
for (qint32 rowNum = 0; rowNum < treeModel->rowCount(parentIndex); ++rowNum) {
QModelIndex childIndex = treeModel->index(rowNum, 0, parentIndex);
tree->setExpanded(childIndex, expand);
expandNode(childIndex);
}
}