Qt World Summit: Register Today!

[Closed] Ip address setting using Qt application

  • Hi,
    I am working on an embedded project (Linux os running on ARM 9 processor). Qt is used for GUI.
    currently I have to develop an application which can set/reset the Ip address of the device using Qt application. Till now I am able to get the IP address of the device through Qt by using Qprocess and ifconfig etc but I am not been able to change the Ip address.
    Here is the snippet :
    QString setbuff;
    char* ip_buff = "";
    setbuff.sprintf("ifconfig eth0 %s netmask up",ip_buff);
    qDebug() << setbuff;

    QProcess *qProc = new QProcess(this);

    qDebug() << setbuff;
    QString tmp = qProc->readAll();
    The set buff content is showing correctly as : "ifconfig eth0 netmask up"
    But when the code is cross compiled and run on the target embedded device, the Ip address is not setting as
    BTW the target device is executing the code in root mode.

    Please help me solve this problem

  • You already "started a topic":http://developer.qt.nokia.com/forums/viewthread/9670/ on this recently. Please continue the discussion there. I am closing this topic.

Log in to reply