QSGSimpleRectNode

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

Inheritance diagram of PySide2.QtQuick.QSGSimpleRectNode

Synopsis

Functions

Detailed Description

Warning

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 createRectangleNode() or createRectangleNode() .

class QSGSimpleRectNode

QSGSimpleRectNode(rect, color)

param color

QColor

param rect

QRectF

Constructs a QSGSimpleRectNode instance with an empty rectangle and white color.

Constructs a QSGSimpleRectNode instance which is spanning rect with the color color .

PySide2.QtQuick.QSGSimpleRectNode.color()
Return type

QColor

Returns the color of this rectangle.

See also

setColor()

PySide2.QtQuick.QSGSimpleRectNode.rect()
Return type

QRectF

Returns the rectangle that this rect node covers.

See also

setRect()

PySide2.QtQuick.QSGSimpleRectNode.setColor(color)
Parameters

colorQColor

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

See also

color()

PySide2.QtQuick.QSGSimpleRectNode.setRect(rect)
Parameters

rectQRectF

Sets the rectangle of this rect node to rect .

See also

rect()

PySide2.QtQuick.QSGSimpleRectNode.setRect(x, y, w, h)
Parameters
  • xqreal

  • yqreal

  • wqreal

  • hqreal

This is an overloaded function.

Sets the rectangle of this rect node to begin at (x , y ) and have width w and height h .