Since you have fixed sequence of functions, dervice from QThread and implement that sequence in its run() method.
Then create an instance of that class and run it.
You could also create a second, non-UI program and start that from the UI program using QProcess.
Cheers,
_
Bookmarks