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:
private:
QFutureWatcher<GDALDataset *> *watcher;
QFuture<GDALDataset *> future;
public slots:
void copyComplete(QFuture<GDALDataset *>);
private:
QFutureWatcher<GDALDataset *> *watcher;
QFuture<GDALDataset *> future;
public slots:
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:
watcher = new QFutureWatcher<GDALDataset *>();
connect(watcher,SIGNAL(finished()),this,SLOT(copyComplete(future)));
future = QtConcurrent::run(boost::bind<GDALDataset *>(&GDALDriver::CreateCopy,poNITFDriver, pszDstFilename, poDataset, FALSE, papszOptions, pfnProgress, progMessage));
watcher->setFuture(future);
watcher = new QFutureWatcher<GDALDataset *>();
connect(watcher,SIGNAL(finished()),this,SLOT(copyComplete(future)));
future = QtConcurrent::run(boost::bind<GDALDataset *>(&GDALDriver::CreateCopy,poNITFDriver, pszDstFilename, poDataset, FALSE, papszOptions, pfnProgress, progMessage));
watcher->setFuture(future);
To copy to clipboard, switch view to plain text mode
and my slot:
void ViewerMain::copyComplete(QFuture<GDALDataset *>f)
{
qDebug("Copy complete fired!");
}
void ViewerMain::copyComplete(QFuture<GDALDataset *>f)
{
qDebug("Copy complete fired!");
}
To copy to clipboard, switch view to plain text mode
That last qDebug statement never gets called. What am I doing wrong?
Bookmarks