The server page was not loading and the issue was I was using the server's newConnection() signal to immediately write the html page to the client. But you have to wine and dine the client first. I ended up connecting the newConnection() signal to a set up function:
void Server::handleConnection()
{
QTcpSocket* client = nextPendingConnection();
//client->setSocketOption(QAbstractSocket::KeepAliveOption, 0);
QObject::connect(client,&QTcpSocket::readyRead,this,[=](){
handleRequest(client);
});
}
You can then write the HTML content to the client in handleRequest()