how to GATEWAY and DNS Setting? in linux
my system linux.
how to IP and MASK and GATEWAY and DNS Setting?
I use the QProccess?
If so, what should I Command?
my source code
QString ip = ui->lineEdit->text();
QString mask = ui->lineEdit_2->text();
QString cmd = QString("ifconfig eth0 %1 netmask %2 up").arg(ip,mask);
QProcess *qProc = new QProcess(this); qProc->execute(cmd);
First thing, you need to check that you have the rights to call ifconfig.
Then you can grab the output from QProcess and parse it to get the data you want.