Hi!

Yeah.. the docs on the QtConcurrent stuff are really poor!

What you could do is store your float data together with the width and height value together in a small class, like so:

Qt Code:
  1. class FloatImage
  2. {
  3. public:
  4. FloatImage(QVector<const float*> data, int width, int height) : data(data),width(width),height(height) {}
  5. QVector<const float*> data;
  6. int width;
  7. int height;
  8. QImage toImage()
  9. {
  10. // Your code..
  11. }
  12. };
To copy to clipboard, switch view to plain text mode 
You can call this with QtConcurrent::run

Qt Code:
  1. FloatImage fi(yourData,200,100);
  2. QFutureSynchronizer<QImage> synchronizer;
  3. synchronizer.addFuture( QtConcurrent::run(fi,&FloatImage::toImage));
  4. ...
  5. synchronizer.waitForFinished();
To copy to clipboard, switch view to plain text mode 

This shows how to wait for multiple operations with QFutureSynchronizer!

HIH

Johannes