16,216
社区成员
发帖
与我相关
我的任务
分享
void Encrypt::on_encBtn_clicked()
{
QString s1 = ui->fileLineEdit->text();
QString s2 = ui->pswdLineEdit->text();
QString s3 = ui->xLineEdit->text();
QString command;
QString command1;
QString command2;
command.append("./enc1.sh");
command.append(" ");
command.append(s1);
command.append(" ");
command.append(s2);
command1.append("./enc2.sh");
command1.append(" ");
command1.append(s1);
command1.append(" ");
command1.append(s2);
command2.append("./cpabe-enc pub_key ");
command2.append(s2);
command2.append(" ");
command2.append(s3);
QProcess p(0);
p.setWorkingDirectory("/Users/czy/Desktop/cpabe");
p.start(command);
p.waitForFinished();
p.start(command2);
p.waitForFinished();
p.start(command1);
p.waitForFinished();
}
void Encrypt::on_encBtn_clicked()
{
QString s1 = ui->fileLineEdit->text();
QString s2 = ui->pswdLineEdit->text();
QString s3 = ui->xLineEdit->text();
QString command1 = "./enc1.sh";
QString command2 = "./cpabe-enc";
QString command3 = "./enc2.sh";
QStringList argu1;
QStringList argu2;
QStringList argu3;
argu1<<s1<<s2;
argu2<<"pub_key"<<s2<<s3;
argu3<<s1<<s2;
QProcess p(0);
p.setWorkingDirectory("/Users/czy/Desktop/cpabe");
p.start(command1,argu1);
p.waitForFinished();
p.start(command2,argu2);
p.waitForFinished();
p.start(command3,argu3);
p.waitForFinished();
}
毛的。有没有函数说明手册啊..这玩意也不报错,我也不知道哪里除了问题