How can I change the gateway and DNS
-
hi @Mihan.
- Can you provide us a better explanation of what is your issue ?
- Are you trying to set your system network settings or for another purpose ?
-
@KillerSmath Hi
Yes I want to set the system network settings (linux). Is there no interface about set the network setting on Qt because of different API between WINDOWS and Linux? -
@KillerSmath Yep I used QProcess("ifconfig ....") to set it. But when the machine restarted, the network settings would be restored to the old settings. I must save the latest settings and call this function again when restart. So ..... do you have any other better suggestions? Thank you.
-
@Mihan Well ... probably this information is stored in a configuration file.
You have to find out which config file is used by your O/S [*] and then probably you can make the changes directly there from your program.
Regards
*) Yeah there are really many possible locations for such a file, depending on the OS