Looking at that again now - you appear to be creating the QStandarditemModel as a local variable (i.e. on the stack), so it will be destroyed when it goes out of context. I had a similar issue using PyQt. Have you tried creating it on the heap instead (i.e. QStandardItem *model = new QStandardItemModel(10,2))?