Obsolete Members for QSocketNotifier

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

Señales

(deprecated) void activated(int socket)[see note below]

Nota: Se trata de una señal privada. Puede ser utilizada en conexiones de señales pero no puede ser emitida por el usuario.

Documentación de las funciones miembro

[private signal, deprecated] void QSocketNotifier::activated(int socket)

Esta función está obsoleta. Desaconsejamos su uso en código nuevo.

Para evitar el truncamiento no intencionado del descriptor, use la sobrecarga QSocketDescriptor de esta función. Si necesita compatibilidad con versiones anteriores a la 5.15 necesita cambiar el slot para aceptar qintptr si actualmente acepta un int, y entonces conectarse usando Functor-Based Connection.

Esta señal se emite siempre que el notificador de socket está habilitado y se produce un evento de socket correspondiente a su type.

El identificador del socket se pasa en el parámetro socket.

Nota: Esta es una señal privada. Puede ser utilizada en conexiones de señal pero no puede ser emitida por el usuario.

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

// Connect using qOverload:
connect(socketNotifier, qOverload(&QSocketNotifier::activated),
        receiver, &ReceiverClass::slot);

// Or using a lambda:
connect(socketNotifier, qOverload(&QSocketNotifier::activated),
        this, [](int socket) { /* handle activated */ });
Para más ejemplos y enfoques, consulte la conexión a señales sobrecargadas.

Véase también type() y socket().

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