I assume You want to change "local" address (your inside LAN) if not look one post up.
Probably fastest/easiest way to achieve that is to use QProcess -> ifconfig and change IP.
Or write your code to do so.

Either way That will require root access.