Obsolete Members for QSocketNotifier

The following members of class QSocketNotifier are deprecated. They are provided to keep old source code working. We strongly advise against using them in new code.

Signals

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

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

Member Function Documentation

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

This function is deprecated. We strongly advise against using it in new code.

To avoid unintended truncation of the descriptor, use the QSocketDescriptor overload of this function. If you need compatibility with versions older than 5.15 you need to change the slot to accept qintptr if it currently accepts an int, and then connect using Functor-Based Connection.

This signal is emitted whenever the socket notifier is enabled and a socket event corresponding to its type occurs.

The socket identifier is passed in the socket parameter.

Note: This is a private signal. It can be used in signal connections but cannot be emitted by the user.

Note: Signal activated is overloaded in this class. To connect to this signal by using the function pointer syntax, Qt provides a convenient helper for obtaining the function pointer as shown in this example:

connect(socketNotifier, QOverload<int>::of(&QSocketNotifier::activated),
    [=](int socket){ /* ... */ });

See also type() and socket().

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