First, you need to have public IP on your server PC, that is:
a) you must have only one router (not two or more cascaded in your home), and
b) you must use UPnP to open the ports you want to listen on. Unfortunately, for whatever reason, Qt never bothered to at least port a UPnP library (e.g. miniupnp) to Qt.

Second, you need to know, from the outside, sour server's IP: for this you need a "known server" with a known static IP where you should publish your server PC's IP each time the server starts, or use something like dyndns.

Finally, even with the setup above, you can only use this solution if your server PC does not connect via a mobile network, because in that case you can't open any UPnP ports on your provider. (see http://stackoverflow.com/questions/13996361/getting-around-nat-for-p2p-app-if-i-have-all-ip-info/14202854#14202854 )