관련 사물
관련 명령은 문서화된 한 요소가 다른 문서화된 요소와 어떻게 관련되는지 지정하는 데 사용됩니다. 몇 가지 예시입니다:
- 이 함수는 다른 함수의 오버로드입니다.
- 이 함수는 다른 함수의 재구현입니다.
- 이 typedef는 일부 클래스 또는 헤더 파일과 관련이 있습니다.
QML 유형이 다른 QML 유형을 상속한다는 것을 문서화하기 위한 명령도 있습니다.
명령
\inherits
inherits 명령은 한 QML 유형이 다른 QML 유형을 상속한다는 것을 문서화하기 위한 명령입니다. 이 명령은 상속 요소의 \qmltype 주석에 포함되어야 합니다. 인수는 상속된 QML 유형의 이름입니다.
/*! \qmltype PauseAnimation \nativetype QDeclarativePauseAnimation \ingroup qml-animation-transition \since 4.7 \inherits Animation \brief The PauseAnimation element provides a pause for an animation. When used in a SequentialAnimation, PauseAnimation is a step when nothing happens, for a specified duration. A 500ms animation sequence, with a 100ms pause between two animations: SequentialAnimation { NumberAnimation { ... duration: 200 } PauseAnimation { duration: 100 } NumberAnimation { ... duration: 200 } } \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */
QDoc은 PauseAnimation 요소에 대한 참조 페이지에 이 줄을 포함합니다:
Inherits Animation
\overload
overload 명령은 함수가 해당 이름의 보조 과부하임을 나타내는 데 사용됩니다.
이 명령은 자체 줄에 있어야 합니다.
오버로드된 함수 이름(생성자 제외)의 경우, QDoc은 함수의 기본 버전이 하나이고 \overload 명령으로 표시된 다른 모든 버전이 있을 것으로 예상합니다. 기본 버전은 완전히 문서화되어 있어야 합니다. 각 오버로드에는 해당 오버로드 버전에 대해 추가하려는 추가 문서가 있을 수 있습니다.
overload 명령의 매개변수로 함수 이름과 '()'를 포함할 수 있으며, 여기에는 기본 버전의 함수에 대한 문서 링크가 포함된 표준 이 함수는 오버로드됩니다... 줄의 텍스트가 포함됩니다.
/*! \overload addAction() This convenience function creates a new action with an \a icon and some \a text. The function adds the newly created action to the menu's list of actions, and returns it. \sa QWidget::addAction() */ QAction *QMenu::addAction(const QIcon &icon, const QString &text) { QAction *ret = new QAction(icon, text, this); addAction(ret); return ret; }
overload 명령에 함수 이름을 포함하지 않으면 기본 버전의 문서 링크가 포함된 "이 함수는..." 줄 대신 이전 표준 줄이 표시됩니다:
이것은 편의를 위해 제공되는 과부하된 멤버 함수입니다.
.
\reimp
reimp 명령은 함수가 가상 함수의 재구현임을 나타내는 데 사용됩니다.
이 명령은 자체 줄에 있어야 합니다.
QDoc은 클래스 참조에서 재구현된 함수를 생략합니다.
/*! \reimp */ void QToolButton::nextCheckState() { Q_D(QToolButton); if (!d->defaultAction) QAbstractButton::nextCheckState(); else d->defaultAction->trigger(); }
이 함수는 문서에 포함되지 않습니다. 대신 기본 함수 QAbstractButton::nextCheckState()에 대한 링크가 문서에 표시됩니다.
\관련
관련 명령은 클래스, 네임스페이스 또는 헤더 파일에 엔티티(함수, 매크로, typedef, 열거형 또는 변수)의 문서를 포함하기 위한 명령입니다. 인수는 엔티티가 연관된 클래스, 네임스페이스 또는 헤더의 이름입니다.
인수가 템플릿화된 유형을 참조하는 경우 템플릿 매개변수 없이 유형 이름만 사용합니다.
/*! \relates QChar Reads a char from the stream \a in into char \a chr. \sa {Format of the QDataStream operators} */ QDataStream &operator>>(QDataStream &in, QChar &chr) { quint16 u; in >> u; chr.unicode() = ushort(u); return in; }
이 함수에 대한 설명서는 관련 비회원 섹션 아래에 나열된 QChar 클래스에 대한 참조 페이지에 포함되어 있습니다.
© 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.