I have Qt4 app which binds QStandardItemModel
to the QListView
and have the model updated from background/non-UI thread.
Sometimes, when the QStandardItem
's setText(..)
method is called very repeatedly from the non-UI thread, the application will crash at a la dataChanged(..) handler. I can reproduce the issue by calling setText("xxxxx")
repeatedly in a for loop. In my app, the data is read from network hence I update the model in separate, non-UI thread.
Is this a common pb? If I understand correctly, this is related to queued connection and QStandardItemModel
is not thread safe? How to get around this issue?
Thanks!