[Qt-interest] QAbstractItemModel data supplied by a different thread.

Justus Best just18 at gmx.de
Tue Jul 27 13:45:19 CEST 2010


Hi,

I trying to implement a fancy looking kinetic scrollable ListView. The 
fancy looking and the kinetic scrolling I could solve by my self, but 
the images I'm displaying have to be scaled first which leads to 
performance problems if I do the scaling in the data function. I hoped 
that using some functions from QtConcurrent could solve my problem, but 
I can't exactly find out how to bring this together.
What would be the "right" solution to get the job done, should I display 
placeholder images at first and call 
QtConcurrent::run(someScalingFunction...) install a QFutureWatcher on 
the result and emmit the dataChanged-Signal every time a new Pixmap is 
ready ? Or is there another solution.
I'm open for any suggestions or some examples where I can look up how to 
do this right.

Regards Justus



More information about the Qt-interest-old mailing list