En esta página

QSGRectangleNode Class

La clase `QSGRectangleNode` es una clase de ayuda para dibujar rectángulos con relleno sólido utilizando el grafo de escena. Más información...

Encabezado: #include <QSGRectangleNode>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
Heredado de: QSGGeometryNode

Funciones públicas

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)

Descripción detallada

Documentación de las funciones de miembro

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

Destruye la instancia de ` QSGRectangleNode`. Este destructor es virtual.

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

Devuelve el color de este rectángulo.

Véase también setColor().

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

Devuelve el rectángulo que abarca este nodo «rect».

Véase también ` setRect()`.

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

Establece el color de este rectángulo en color. El color por defecto será el blanco.

Véase también color().

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

Establece el rectángulo de este nodo «rect» en rect.

Véase también rect().

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

Establece que el rectángulo de este nodo «rect» comience en (x, y) y tenga un ancho de w y una altura de h.

Esta es una función sobrecargada.

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