Hi,
I have a program which is a QStandardItemModel connected to a QTableView through a QSortFilterProxyModel. I've subclassed the Model and the Proxy to perform filtering on the data, though all the actual computation occurs in the Model. In the future, I'm going to rewrite the Model to make it more efficient, basing it off the QAbstractItemModel so that I can use my own data structures.
So that's the background. What I would like to do is add a 'worker' thread in somewhere to get rid of the delay which occurs when the worker thread is processing large sets of data. If the user provides new input, the worker thread would stop and restart with the new input instead of finishing work which is useless.
My question is how should I add threaded support? I've read the docs and understand the concept of threads, but I'm unsure how I should organise the program.
Should I create a 'Worker' class which the QStandardItemModel will use?
Any suggestions will be appreciated! Thanks all.
Bookmarks