이 페이지에서

QCustom3DLabel Class

QCustom3DLabel 클래스는 그래프에 사용자 정의 레이블을 추가합니다. 더 보기...

헤더: #include <QCustom3DLabel>
CMake: find_package(Qt6 REQUIRED COMPONENTS DataVisualization)
target_link_libraries(mytarget PRIVATE Qt6::DataVisualization)
qmake: QT += datavisualization
버전: QtDataVisualization 1.1부터
QML에서: Custom3DLabel
상속: QCustom3DItem
상태: 사용 중단됨

이 클래스는 더 이상 사용되지 않습니다. 새로운 코드에서는 이 클래스를 사용하지 않는 것을 강력히 권장합니다.

속성

공개 함수

QCustom3DLabel(QObject *parent = nullptr)
QCustom3DLabel(const QString &text, const QFont &font, const QVector3D &position, const QVector3D &scaling, const QQuaternion &rotation, QObject *parent = nullptr)
virtual ~QCustom3DLabel()
QColor backgroundColor() const
QFont font() const
bool isBackgroundEnabled() const
bool isBorderEnabled() const
bool isFacingCamera() const
void setBackgroundColor(const QColor &color)
void setBackgroundEnabled(bool enabled)
void setBorderEnabled(bool enabled)
void setFacingCamera(bool enabled)
void setFont(const QFont &font)
void setText(const QString &text)
void setTextColor(const QColor &color)
QString text() const
QColor textColor() const

신호

void backgroundColorChanged(const QColor &color)
void backgroundEnabledChanged(bool enabled)
void borderEnabledChanged(bool enabled)
void facingCameraChanged(bool enabled)
void fontChanged(const QFont &font)
void textChanged(const QString &text)
void textColorChanged(const QColor &color)

상세 설명

사용자 정의 레이블의 텍스트, 글꼴, 위치, 크기 조정, 회전 및 색상을 설정할 수 있습니다. 또한 레이블의 테두리와 배경의 표시 여부를 전환할 수 있습니다. 색상, 테두리 및 배경은 명시적으로 설정되지 않은 경우 활성 테마에 따라 결정됩니다.

참고: 크기 조정시 z 좌표는 영향을 미치지 않습니다. x 및 y 좌표를 동일하게 설정하면 원래 글꼴 크기가 유지됩니다.

참조: ` QAbstract3DGraph::addCustomItem()`.

속성 설명서

backgroundColor : QColor

이 속성은 레이블이 활성화된 경우 레이블 배경색을 지정합니다.

기본값은 Qt::gray 입니다.

액세스 함수:

QColor backgroundColor() const
void setBackgroundColor(const QColor &color)

알림 신호:

void backgroundColorChanged(const QColor &color)

backgroundEnabled도 참조하십시오 .

backgroundEnabled : bool

이 속성은 레이블 배경이 활성화되어 있는지 여부를 지정합니다.

false 로 설정된 경우, backgroundColor()은 아무런 효과를 발휘하지 않습니다. 기본값은 true 입니다.

액세스 함수:

bool isBackgroundEnabled() const
void setBackgroundEnabled(bool enabled)

알림 신호:

void backgroundEnabledChanged(bool enabled)

borderEnabled : bool

이 속성은 레이블 테두리가 활성화되어 있는지 여부를 지정합니다.

기본값은 ` true`입니다.

액세스 함수:

bool isBorderEnabled() const
void setBorderEnabled(bool enabled)

알림 신호:

void borderEnabledChanged(bool enabled)

facingCamera : bool

이 속성은 레이블이 항상 카메라를 향하도록 할지 여부를 지정합니다.

기본값은 ` false`입니다. ` true`로 설정된 경우, ` rotation()`은 아무런 효과가 없습니다.

액세스 함수:

bool isFacingCamera() const
void setFacingCamera(bool enabled)

알림 신호:

void facingCameraChanged(bool enabled)

font : QFont

이 속성은 레이블에 사용할 글꼴을 지정합니다.

기본값은 QFont("Arial", 20) 입니다. 특수 서식(예: 윤곽선)은 지원되지 않습니다.

액세스 함수:

QFont font() const
void setFont(const QFont &font)

알림 신호:

void fontChanged(const QFont &font)

text : QString

이 속성은 레이블에 표시될 텍스트를 저장합니다.

서식 있는 텍스트는 지원되지 않습니다.

액세스 함수:

QString text() const
void setText(const QString &text)

알림 신호:

void textChanged(const QString &text)

textColor : QColor

이 속성은 레이블 텍스트의 색상을 지정합니다.

활성화된 경우 레이블 테두리에도 영향을 미칩니다. 기본값은 Qt::white 입니다.

액세스 함수:

QColor textColor() const
void setTextColor(const QColor &color)

알림 신호:

void textColorChanged(const QColor &color)

borderEnabled도 참조하십시오 .

멤버 함수 설명서

[explicit] QCustom3DLabel::QCustom3DLabel(QObject *parent = nullptr)

지정된 parent 를 사용하여 사용자 정의 3D 레이블을 생성합니다.

[explicit] QCustom3DLabel::QCustom3DLabel(const QString &text, const QFont &font, const QVector3D &position, const QVector3D &scaling, const QQuaternion &rotation, QObject *parent = nullptr)

지정된 text, font, position, scaling, rotation 및 선택 사항인 parent 을 사용하여 사용자 정의 3D 레이블을 생성합니다.

참고: scaling 에 동일한 x 및 y 좌표를설정하면 원래 글꼴 크기가 유지됩니다.

[virtual noexcept] QCustom3DLabel::~QCustom3DLabel()

사용자 정의 3D 레이블을 삭제합니다.

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