Hello every one!
I'm using QtConcurrent to load a file in other thread:

Qt Code:
  1. struct tipoRegistro {
  2. qint16 val1;
  3. qint16 val2 ;
  4. qint16 val3;
  5. };
  6.  
  7. tipoRegistro MainWindow::readFileStepByStep()
  8. {
  9. file.read(reinterpret_cast<char*> (&reg),sizeof(tipoRegistro));
  10. return reg;
  11. }
  12.  
  13. void MainWindow::qtConcurrentTest()
  14. {
  15. QVector<tipoRegistro> vector;
  16. tipoRegistro treg;
  17. treg.val1 = -1;
  18. treg.val2 = -1;
  19. treg.val3 = -1;
  20. for(int i = 0; i < num_muestras_canal; i++)
  21. vector.append(treg);
  22.  
  23. dialog.setLabelText(QString("Cargando archivo ECG"));
  24.  
  25. QFutureWatcher<void> futureWatcher;
  26. QObject::connect(&futureWatcher, SIGNAL(finished()), &dialog, SLOT(reset()));
  27. QObject::connect(&dialog, SIGNAL(canceled()), &futureWatcher, SLOT(cancel()));
  28. QObject::connect(&futureWatcher, SIGNAL(progressRangeChanged(int,int)), &dialog, SLOT(setRange(int,int)));
  29. QObject::connect(&futureWatcher, SIGNAL(progressValueChanged(int)), &dialog, SLOT(setValue(int)));
  30.  
  31. futureWatcher.setFuture(QtConcurrent::mapped(vector,readFileStepByStep));
  32.  
  33. dialog.exec();
  34.  
  35. futureWatcher.waitForFinished();
  36. }
To copy to clipboard, switch view to plain text mode 

I get the fallowing error:
../ECGReader/mainwindow.cpp: In member function 'void MainWindow::qtConcurrentTest()':
../ECGReader/mainwindow.cpp:264:75: error: no matching function for call to 'mapped(QVector<tipoRegistro>&, <unresolved overloaded function type>)'
../ECGReader/mainwindow.cpp:264:75: note: candidates are:
/usr/include/qt4/QtCore/qtconcurrentmap.h:181:74: note: QFuture<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType> QtConcurrent::mapped(const Sequence&, MapFunctor) [with Sequence = QVector<tipoRegistro>, MapFunctor = tipoRegistro (MainWindow::*)(), typename QtPrivate::MapResultType<void, MapFunctor>::ResultType = void]
/usr/include/qt4/QtCore/qtconcurrentmap.h:181:74: note: no known conversion for argument 2 from '<unresolved overloaded function type>' to 'tipoRegistro (MainWindow::*)()'
/usr/include/qt4/QtCore/qtconcurrentmap.h:188:74: note: template<class Iterator, class MapFunctor> QFuture<typename QtPrivate::MapResultType<void, MapFunctor>::ResultType> QtConcurrent::mapped(Iterator, Iterator, MapFunctor)
I think the problem can be using members fuction, but i tried modifying the line tis way:

futureWatcher.setFuture(QtConcurrent::mapped(vecto r, &MainWindow::readFileStepByStep));
but I keep getting errors

If anyone can help...thanks in advanced.
Regards.

pd: Sorry my english