Is it possible to stop a Thread by its associated QFuture Object ? Currently i've been starting a video capturing process like this.
this->cameraThreadRepresentation = QtConcurrent::run(this,&MainWindow::startLiveCapturing);
Inside the startLiveCapturing-Method an infinite loop is running that captures images and displays them. So if the user wants to stop that process he should simply press a button and that operation stops. But it seems that i can not stop this thread by calling the cancel method like this ?
this->cameraThreadRepresentation.cancel();
What i am doing wrong and how can i stop that thread or operation.