Hello,
I needed a thread-safe treemodel, so I intended to subclass QAbstractItemModel for the purpose.
But I have faced some problems. If any one can help me to overcome them, I will be glad.
Problems:
1. some public methods such as index, parent, rowxount, etc. are called by QAbstractItemModel when I called beginInsertRows, etc. So I cannot mutex these functions correctly. (Actually I use QReadWriteLocker)
2. If I set the model from UI thread the endInsertRows calls treeView's methods directly. (which means treeView's call to Data appears below my insertItem method in the call stack). So the system is locked.
3. In the index function I am setting (void *) by using createIndex function of QAbstractItemModel, but in one data call an invalid pointer is recieved. Dıes anyone jnows what can cause this.
Best regards,
Bookmarks