Obsolete Members for QWebSocket

I seguenti membri della classe ` QWebSocket ` sono deprecati. Sono forniti per garantire il funzionamento del codice sorgente esistente. Si sconsiglia vivamente di utilizzarli nel codice nuovo.

Segnali

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

Documentazione delle funzioni membro

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

Questa funzione è deprecata a partire dalla versione 6.5. Si sconsiglia vivamente di utilizzarla nel codice nuovo.

Utilizzare invece ` errorOccurred` (errore `QAbstractSocket::SocketError `).

Nota: questo segnale è sovraccaricato. Per collegarsi a questo segnale:

// 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 */ });
Per ulteriori esempi e approcci, consultare la sezione «Collegarsi a segnali sovraccaricati».

© 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.