Obsolete Members for QWebSocket

Los siguientes miembros de la clase QWebSocket son obsoletos. Se proporcionan para que el código fuente antiguo siga funcionando. Desaconsejamos su uso en código nuevo.

Señales

(deprecated in 6.5) void error(QAbstractSocket::SocketError error)

Documentación de funciones

[signal, deprecated in 6.5] void QWebSocket::error(QAbstractSocket::SocketError error)

Esta función está obsoleta desde la versión 6.5. Desaconsejamos su uso en código nuevo.

Utilice errorOccurred(QAbstractSocket::SocketError error) en su lugar.

Nota: Esta señal está sobrecargada. Para conectarse a esta señal:

// Connect using qOverload:
connect(webSocket, qOverload(&QWebSocket::error),
        receiver, &ReceiverClass::slot);

// Or using a lambda:
connect(webSocket, qOverload(&QWebSocket::error),
        this, [](QAbstractSocket::SocketError error) { /* handle error */ });
Para más ejemplos y enfoques, consulte la conexión a señales sobrecargadas.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.