i tried using QHostAddress to initialse my QTcpServer object but whenever i start the server i get an error unable to start the server.
this is the code for initialising the server
Qt Code:
  1. QTcpServer *tcpserver;
  2. tcpserver = new QTcpServer(this);
  3.  
  4. QHostAddress hostadd("192.168.3.89");
  5.  
  6. tcpserver->listen(hostadd,23456);
  7. if (!tcpserver->listen()) {
  8.  
  9. QMessageBox::critical(this, tr("Fortune Server"), tr("Unable to start the server: %1.").arg(tcpserver->errorString()));
  10. close();
  11. return;
  12. }
To copy to clipboard, switch view to plain text mode 

when i compile i get no error.
is this correct??? please help me
thanx in advance