Connection Class

class QMetaObject::Connection

공용 함수

Connection()
Connection(const QMetaObject::Connection &other)
Connection(QMetaObject::Connection &&o)
~Connection()
void swap(QMetaObject::Connection &other)
bool operator bool() const
QMetaObject::Connection &operator=(QMetaObject::Connection &&other)
QMetaObject::Connection &operator=(const QMetaObject::Connection &other)

상세 설명

신호-슬롯(또는 신호-펙터) 연결에 대한 핸들을 나타냅니다.

연결이 유효한지 확인하고 QObject::disconnect()를 사용하여 연결을 끊는 데 사용할 수 있습니다. 컨텍스트 객체가 없는 신호-펙터 연결의 경우 해당 연결을 선택적으로 끊을 수 있는 유일한 방법입니다.

연결은 핸들일 뿐이므로 연결이 파괴되거나 재할당되어도 기본 신호-슬롯 연결은 영향을 받지 않습니다.

멤버 함수 문서

Connection::Connection()

연결 인스턴스를 만듭니다.

Connection::Connection(const QMetaObject::Connection &other)

other 연결에 대한 핸들 사본을 만듭니다.

[noexcept] Connection::Connection(QMetaObject::Connection &&o)

이동 - 연결 인스턴스를 구성하여 o 가 가리키던 것과 동일한 개체를 가리키도록 합니다.

[noexcept] Connection::~Connection()

의 소멸자 QMetaObject::Connection.

[noexcept] void Connection::swap(QMetaObject::Connection &other)

이 연결 인스턴스를 other 로 바꿉니다. 이 작업은 매우 빠르며 실패하지 않습니다.

bool Connection::operator bool() const

연결이 유효한 경우 true 을 반환합니다.

QObject::connect 호출이 성공하면 연결이 유효합니다. QObject::connect 에서 신호 또는 슬롯을 찾지 못했거나 인수가 일치하지 않으면 연결이 유효하지 않습니다.

[noexcept] QMetaObject::Connection &Connection::operator=(QMetaObject::Connection &&other)

이동 - 이 객체에 other 을 할당하고 참조를 반환합니다.

QMetaObject::Connection &Connection::operator=(const QMetaObject::Connection &other)

other 을 이 연결에 할당하고 이 연결에 대한 참조를 반환합니다.

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