Hello,

I am trying to figure out why my watcher does not appear to call it's finished signal, and in turn, my slot is not being called.

in my header file, I have the following declared:

Qt Code:
  1. private:
  2. QFutureWatcher<GDALDataset *> *watcher;
  3. QFuture<GDALDataset *> future;
  4. public slots:
  5. void copyComplete(QFuture<GDALDataset *>);
To copy to clipboard, switch view to plain text mode 

And in the function where I want to use these, I have the following:


Qt Code:
  1. watcher = new QFutureWatcher<GDALDataset *>();
  2. connect(watcher,SIGNAL(finished()),this,SLOT(copyComplete(future)));
  3.  
  4.  
  5. future = QtConcurrent::run(boost::bind<GDALDataset *>(&GDALDriver::CreateCopy,poNITFDriver, pszDstFilename, poDataset, FALSE, papszOptions, pfnProgress, progMessage));
  6. watcher->setFuture(future);
To copy to clipboard, switch view to plain text mode 

and my slot:

Qt Code:
  1. void ViewerMain::copyComplete(QFuture<GDALDataset *>f)
  2. {
  3. qDebug("Copy complete fired!");
  4. }
To copy to clipboard, switch view to plain text mode 


That last qDebug statement never gets called. What am I doing wrong?