Qt 5.6 | Qt Quick | C++ Classes | QSGSimpleRectNode

Qt 5.6.2 Reference Documentation

# QSGSimpleRectNode Class

The QSGSimpleRectNode class is a convenience class for drawing solid filled rectangles using scenegraph. More...

Header: | #include <QSGSimpleRectNode>
qmake: | QT += quick
Inherits: | QSGGeometryNode

- List of all members, including inherited members

## Public Functions

| QSGSimpleRectNode(const QRectF &rect, const QColor &color)
| QSGSimpleRectNode()
QColor | color() const
QRectF | rect() const
void | setColor(const QColor &color)
void | setRect(const QRectF &rect)
void | setRect(qreal x, qreal y, qreal w, qreal h)

- 4 public functions inherited from QSGGeometryNode
- 3 public functions inherited from QSGBasicGeometryNode
- 20 public functions inherited from QSGNode

## Detailed Description

The QSGSimpleRectNode class is a convenience class for drawing solid filled rectangles using scenegraph.

## 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

Returns the color of this rectangle.

See also setColor().

### QRectF QSGSimpleRectNode::rect() const

Returns the rectangle that this rect node covers.

See also setRect().

### void QSGSimpleRectNode::setColor(const QColor &color)

Sets the color of this rectangle to color. The default color will be white.

See also color().

### void QSGSimpleRectNode::setRect(const QRectF &rect)

Sets the rectangle of this rect node to rect.

See also 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.