Thank u very much for your replies
I got it. 
Finally i got it the ipaddress only by using the QProcess.
My code was
arguments << "-c" << "ifconfig eth0 | grep ‘inet ‘ | awk ‘{print $2}’ | sed ’s/addr://’";
process->start(prog , arguments);
process->waitForFinished();
qDebug() << tmp;
QString prog = "/bin/bash";//shell
QStringList arguments;
arguments << "-c" << "ifconfig eth0 | grep ‘inet ‘ | awk ‘{print $2}’ | sed ’s/addr://’";
QProcess* process = new QProcess(this);
process->start(prog , arguments);
process->waitForFinished();
QString tmp = process->readAll();
qDebug() << tmp;
To copy to clipboard, switch view to plain text mode
Above code will return only the ip address of the local mechine [ etho inet address: ]
Bookmarks