boost bind to a class member function passed to QtConcurrent
I am trying to use boost to pass a function to QtConcurrent.
QFutureWatcher<GDALDataset> watcher;
QFuture<GDALDataset> future;
GDALDriver *poNITFDriver;
future = QtConcurrent::run(boost::bind(
&GDALDriver::CreateCopy,
poNITFDriver,
pszDstFilename,
poDataset,
FALSE,
papszOptions,
pfnProgress,
NULL
));
watcher.setFuture(future);
where poNITFDriver is the instance of the class containing the method.
What am I doing wrong here? I get the following compile errors:
error: no match for
operator=
in future =QtConcurrent::run(FunctionObject)
withFunctionObject
=boost::_bi::bind_t<GDALDataset*, boost::_mfi::mf6<GDALDataset*, GDALDriver, const char*, GDALDataset*, int, char**, int (*)(double, const char*, void*), void*>, boost::_bi::list7<boost::_bi::value<GDALDriver*>, boost::_bi::value<const char*>, boost::_bi::value<GDALDataset*>, boost::_bi::value&l开发者_开发知识库t;bool>, boost::_bi::value<char**>, boost::_bi::value<int (*)(double, const char*, void*)>, boost::_bi::value<long int> > >
精彩评论