이 페이지에서

QMetaObject::Connection Class

class QMetaObject::Connection

공개 함수

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

상세 설명

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

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

Connection은 단순한 핸들이므로, Connection이 소멸되거나 재할당되더라도 기본이 되는 시그널-슬롯 연결에는 영향을 미치지 않습니다.

멤버 함수 문서

[noexcept] Connection::Connection()

Connection 인스턴스를 생성합니다.

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

other 연결에 대한 핸들의 복사본을 생성합니다.

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

Connection 인스턴스를 이동 생성(move-construct)하여, 해당 인스턴스가 ` o `가 가리키던 것과 동일한 객체를 가리키도록 합니다.

[noexcept] Connection::~Connection()

QMetaObject::Connection 의 소멸자.

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

이 Connection 인스턴스를 ` other`로 교체합니다. 이 작업은 매우 빠르며 실패하는 일이 없습니다.

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 `를 할당하고, 이 연결에 대한 참조를 반환합니다.

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