OK, I got it; something stupid. When I started this project I did not include the networking module. Changing the line in the *.pro file fixed this.

Qt Code:
  1. QT += core gui network
To copy to clipboard, switch view to plain text mode