QHostAddress setAddress not working
<p>I need to change my host IP Address on Linux app using Qt. I have readed documentation about QHostAddress and method setAddress in this class that say the following: </p>

<blockquote>
  <p>"Sets the IPv4 or IPv6 address specified by the string representation >specified by address (e.g. "127.0.0.1"). Returns true and sets the address >if the address was successfully parsed; otherwise returns false."</p>
</blockquote>

<p>I know that it is possible using QProccess but I'm trying to use Qt-way in order to do that. I'm very confused becuase my app is not in running with root privileges so I find very difficult perform this action using Qt class directly. Then I try this:</p>

<pre><code>QHostAddress hostAddress;
bool ipChange = hostAddress.setAddress("192.168.1.143");
if(ipChange) qDebug() &lt;&lt; "IP ADDRESS CHANGED";
else qDebug() &lt;&lt; "IP ADDRESS NOT CHANGED";
</code></pre>

<p>The result of this code is <code>"IP ADDRESS CHANGED"</code> but doing <code>ifconfig</code> in a terminal, my IP address has not been modified. So, my questions are:</p>

<ol>
<li>How I can do that?</li>
<li>Why I can see <code>IP ADDRESS CHANGED</code> if this method obviously doesn't works?</li>
</ol>