QMetaObject::Connection Class
The Connection class represents a handle to a signal-slot connection. More…
| Header | #include <QMetaObject> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::Core) |
| Module | Nt Core C++ Classes |
| Nested in | QMetaObject |
List of all members, including inherited members
Public Functions
| Connection() | |
| operator bool() const |
Detailed Description
A Connection is returned by QObject::connect() and can be passed to QObject::disconnect() to remove the connection. It does not keep the connection alive, and may be copied freely.
See also QObject::connect() and QObject::disconnect().
Differences from Qt
A Connection is only a weak handle; it has no operator==().
Member Function Documentation
QMetaObject::Connection::Connection()
Constructs an invalid connection handle.
QMetaObject::Connection::operator bool() const
Returns true if the connection is still valid; otherwise returns false. A connection becomes invalid when it is disconnected or when its sender or receiver is destroyed.