I need to make a connection to local server that is located at mobile phone

But when I am trying to connect to it through XMLHttpRequest in QtWebkit, QT always tries to open connection to internet (wi-fi, gprs/wap). But this is ridiquolus because its a local resourse. I even tried to change to localhost, but this didn't make any sence.

How can I prevent connection to internet in this case with promt window.