The problem I encountered is that I decided to implement QThreads
the way they are supposed to, based on numerous articles:
https://www.qt.io/blog/2010/06/17/youre-doing-it-wrong
http://mayaposch.wordpress.com/2011/11/01/how-to-really-truly-use-qthreads-the-full-explanation/
and issue at hand is that since the algorithm is run in separate QObject
(wrapped in QThread
). How can I call out something like Thread::Sleep
or smth .. Any ideas?
A small description of the software.
Basically my application solves TSP
(Traveling salesman problem). As the search goes along, it saves all the states in the history as frames
..(like visual frames). The search algorithms will be run on one thread.
Main thread is handling with the GUI.
Then there is the Mediaplayer
like thread which tells Main
thread what frame to display on screen. So where does the sleep come in ?
In gui there is a slider that user can use to fast forward or go in normal pace.. that slider tells via signal slot to Mediaplayer
thread to go faster or slower.