int setProgress(int i){
ui->progress->setValue(i);
}
int some(){
fortran_func( ... , ... , setProgress )
}
Subroutine Fortran_Func( ... , ... , callBack )
do i = 1 , 1000
....
call callBack( i )
end do
End Subroutine Fortran_Func
QDialog *pThis;
void progress(int a){
pThis->ui->progress->setValue(a);
}
void QDialog::on_okBtn_clicked(){
pThis = this;
thread->start();
}
void Thread::run(){
in(progress);
}
欢迎光临 Fortran Coder (http://bbs.fcode.cn/) | Powered by Discuz! X3.2 |