I want to let QProcess run many command at a time,instead of one at a time.
void Route::add_route()
{
QProcess *Add_route = new QProcess(this);
Add_route->start("notepad",QStringList() << "interface" << "ipv4" << "set" << "interface" << "" << "metric=1");
Add_route->start("explorer",QStringList() << "interface" << "ipv6" << "set" << "interface" << "" << "metric=1");
Add_route->waitForFinished();
}
By using this,it will only run the first one.
Ps: I'm using notepad and explorer just for test
Thanks!
Aucun commentaire:
Enregistrer un commentaire