Thanks for the response!
The only thing thats happening on the main thread side is connecting the update signal to this slot, where I've just been tinkering with repaint, etc....:
self.connect(my_runner,SIGNAL('update_main'),self.update_main)
....
def update_main(self,data):
self.run_progress_bar.increment()
#self.run_progress_bar.repaint()
row = self.output_model.rowCount()
for col in range(len(data)):
#self.output_model.beginInsertRows(QtCore.QModelIndex(),row,row)
self.output_model.setItem(row,col,item)
#self.output_model.endInsertRows()
self.connect(my_runner,SIGNAL('update_main'),self.update_main)
....
def update_main(self,data):
self.run_progress_bar.increment()
#self.run_progress_bar.repaint()
row = self.output_model.rowCount()
for col in range(len(data)):
item = QtGui.QStandardItem(data[col])
#self.output_model.beginInsertRows(QtCore.QModelIndex(),row,row)
self.output_model.setItem(row,col,item)
#self.output_model.endInsertRows()
To copy to clipboard, switch view to plain text mode
The runs could be anywhere from a few rows to 1,000 rows, each row taking anywhere from a fraction of a second to half a second to calculate. Eventually my 'customers' would like to also have multiple runs going concurrently. We have 16 processor/core workstations and would like to utilize them. So perhaps using Runnables would be better?
I agree, that batching the rows of data would be much better. I'll look into creating a consumer thread with a timer *edit: instead of a producer with a signal
Bookmarks