Obsolete Members for QWebSocket

Los siguientes miembros de la clase ` QWebSocket ` están obsoletos. Se incluyen para que el código fuente antiguo siga funcionando. Recomendamos encarecidamente no utilizarlos en código nuevo.

Señales

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

Documentación de las funciones miembro

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

Esta función está obsoleta desde la versión 6.5. Recomendamos encarecidamente no utilizarla en código nuevo.

Utiliza en su lugar ` errorOccurred` (error `QAbstractSocket::SocketError `).

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 ver más ejemplos y métodos, consulta «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.