In order to accept connections from the outside, you have to listen on 0.0.0.0
, not on 127.0.0.1
or localhost
. The latter will only allow connections coming from the same machine. It's also the value of QHostAddress::LocalHost
.
So change the first argument to QHostAddress::Any
and it should work.