How to use proxymodel in desktop app
-
In application, I use the deprived class of QAbstractTableModel in main thread, handle datas in sub thread and send emit data to main thread. The application runs smoothly to show110W data.
I use QSortFilterProxyModel as prox for deprived class of QAbstractTableModel in main thread, handle datas in sub thread as before, however, the application is suspended and thread is died.
The application run ok while handling a little data.Is there any possible to do that?
Best Regards -
In application, I use the deprived class of QAbstractTableModel in main thread, handle datas in sub thread and send emit data to main thread. The application runs smoothly to show110W data.
I use QSortFilterProxyModel as prox for deprived class of QAbstractTableModel in main thread, handle datas in sub thread as before, however, the application is suspended and thread is died.
The application run ok while handling a little data.Is there any possible to do that?
Best Regards@jowei said in How to use proxymodel in desktop app:
handle datas in sub thread
I probably comes down to what exactly you mean by this. You must not make calls to the model data from a secondary thread while it is in use in the main/UI thread. Do you? The fact that it works when you don't use
QSortFilterProxyModelis probably "fortunate", and the fact that "run ok while handling a little data" but "application is suspended and thread is died." when more data implies problems show up when a decent amount of data is involved.