QSGSimpleRectNode Class▲
-
Header: QSGSimpleRectNode
-
CMake:
find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
-
qmake: QT += quick
-
Inherits: QSGGeometryNode
Detailed Description▲
This utility class is only functional when running with the default or software backends of the Qt Quick scenegraph. As an alternative, prefer using QSGRectangleNode via QQuickWindow::createRectangleNode(). However, this standalone class is still useful when used via subclassing and the application knows that no special scenegraph backends will be involved.
Member Function Documentation▲
QSGSimpleRectNode::QSGSimpleRectNode(const QRectF &rect, const QColor &color)▲
Constructs a QSGSimpleRectNode instance which is spanning rect with the color color.
QSGSimpleRectNode::QSGSimpleRectNode()▲
Constructs a QSGSimpleRectNode instance with an empty rectangle and white color.
QColor QSGSimpleRectNode::color() const▲
QRectF QSGSimpleRectNode::rect() const▲
void QSGSimpleRectNode::setColor(const QColor &color)▲
Sets the color of this rectangle to color. The default color will be white.
See Also▲
See also color()
void QSGSimpleRectNode::setRect(const QRectF &rect)▲
void QSGSimpleRectNode::setRect(qreal x, qreal y, qreal w, qreal h)▲
This is an overloaded function.
Sets the rectangle of this rect node to begin at (x, y) and have width w and height h.