include("scripts/simple.js"); function CsvToPmConvert(filename) { this.filename = filename; } CsvToPmConvert.includeBasePath = includeBasePath; CsvToPmConvert.prototype.getPmFileName = function () { return this.filename.substring(0, this.filename.lastIndexOf(".")) + ".pm"; } CsvToPmConvert.prototype.convert = function () { EAction.handleUserMessage(CsvToPmConvert.includeBasePath + "/csv2pm.exe"); var process = new QProcess; process.setProgram(CsvToPmConvert.includeBasePath + "/csv2pm.exe"); var args = []; args.push(this.filename); process.setArguments(args); process.start(); process.waitForStarted(); //等待程序启动 process.waitForFinished(-1);//等待程序关闭 return true; }