i have created MyThread, subclass QThread and reimplement run(),
class MyThread : public QThread
{
Q_OBJECT
public:
void run();
void stop();
private:
QProcess *MyProcess;
};

MyThread::MyThread(QWidget *parent )
{
MyProcess = new QProcess(parent);
}

void MyThread::run()
{
MyProcess->execute("ComputerFortran"); //call for Fortran computer program
}

void MyThread::stop()
{
MyProcess->kill(); // or
// MyProcess->terminate();
}
when i start external fortran program ,i call start() function.

Quote:

class ...............
{...........
MyThread thread;
............
};

.....................
thread.start();

but I call thread.stop(), the fortran program didn't kill? how to terminate??