이 페이지에서

QSGRectangleNode Class

QSGRectangleNode 클래스는 씬그래프를 사용하여 실선으로 채워진 사각형을 그리는 데 편의를 제공하는 클래스입니다. 더 보기...

헤더: #include <QSGRectangleNode>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
상속: QSGGeometryNode

공개 함수

virtual ~QSGRectangleNode() override
virtual QColor color() const = 0
virtual QRectF rect() const = 0
virtual void setColor(const QColor &color) = 0
virtual void setRect(const QRectF &rect) = 0
void setRect(qreal x, qreal y, qreal w, qreal h)

상세 설명

멤버 함수 설명

[override virtual noexcept default] QSGRectangleNode::~QSGRectangleNode()

QSGRectangleNode 의 인스턴스를 소멸시킵니다. 이 소멸자는 가상 함수입니다.

[pure virtual] QColor QSGRectangleNode::color() const

이 사각형의 색상을 반환합니다.

setColor()도 참조하십시오 .

[pure virtual] QRectF QSGRectangleNode::rect() const

이 rect 노드가 덮고 있는 사각형을 반환합니다.

setRect()도 참조하십시오 .

[pure virtual] void QSGRectangleNode::setColor(const QColor &color)

이 사각형의 색상을 color 로 설정합니다. 기본 색상은 흰색입니다.

color()도 참조하십시오 .

[pure virtual] void QSGRectangleNode::setRect(const QRectF &rect)

이 rect 노드의 사각형을 rect 로 설정합니다.

rect()도 참조하십시오 .

void QSGRectangleNode::setRect(qreal x, qreal y, qreal w, qreal h)

이 rect 노드의 사각형이 (x, y)에서 시작하고, 너비는 w, 높이는 h 이 되도록 설정합니다.

이 함수는 오버로드된 함수입니다.

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