There are lots of examples of using QStandardItemModel in Qt documentation. Just follow the link in this post.