6.0.0-rc4Source

QMetaObject::Connection Class

The Connection class represents a handle to a signal-slot connection. More…

Header#include <QMetaObject>
CMaketarget_link_libraries(app PRIVATE Nt::Core)
ModuleNt Core C++ Classes
Nested inQMetaObject

List of all members, including inherited members

Public Functions

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.

[explicit] 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.