title: How to catch websocket connection error
body: <p>I'm opening a url from Qt/c++ client like,</p>
  
  <pre><code>m_webSocket = new QWebSocket();
  m_webSocket-&gt;open("wss://192.123.1.44:8087");
  </code></pre>
  
  <p>I want catch any errors in connection. How do I do that?
  I've connected to signal <code>QWebSocket:error(QAbstractSocket::SocketError error)</code>, but I never get it triggered even if my server is not running.</p>
  
  <p><strong>Edit</strong>:
  I'm connecting to error signal as below,</p>
  
  <pre><code>m_webSocket = new QWebSocket();
  connect(m_webSocket, SIGNAL(error(QAbstractSocket::SocketError error)), this, SLOT(onWebSocketError(QAbstractSocket::SocketError error)));
  m_webSocket-&gt;open(url);
  </code></pre>
  
  <p>This seems to be not working.</p>