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 PySide2.QtQuick.QSGSimpleRectNode

PySide2.QtQuick.QSGSimpleRectNode(rect, color)

param color

PySide2.QtGui.QColor

param rect

PySide2.QtCore.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

PySide2.QtGui.QColor

Returns the color of this rectangle.

See also

setColor()

PySide2.QtQuick.QSGSimpleRectNode.rect()
Return type

PySide2.QtCore.QRectF

Returns the rectangle that this rect node covers.

See also

setRect()

PySide2.QtQuick.QSGSimpleRectNode.setColor(color)
Parameters

colorPySide2.QtGui.QColor

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

See also

color()

PySide2.QtQuick.QSGSimpleRectNode.setRect(rect)
Parameters

rectPySide2.QtCore.QRectF

Sets the rectangle of this rect node to rect .

See also

rect()

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

  • y – float

  • w – float

  • h – float

This is an overloaded function.

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