I have found that passing an integer into createIndex invokes the overloaded method that creates an index with an internal id, not an internal pointer. Calling internalPointer() on such an index usually results in a segfault. See also http://doc.qt.nokia.com/latest/qmodelindex.html#internalId