QSGSimpleRectNode#
The QSGSimpleRectNode
class is a convenience class for drawing solid filled rectangles using scenegraph. More…
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()
. However, this standalone class is still useful when used via subclassing and the application knows that no special scenegraph backends will be involved.
- class PySide6.QtQuick.QSGSimpleRectNode#
PySide6.QtQuick.QSGSimpleRectNode(rect, color)
- Parameters
color –
PySide6.QtGui.QColor
rect –
PySide6.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
.
- PySide6.QtQuick.QSGSimpleRectNode.color()#
- Return type
Returns the color of this rectangle.
See also
- PySide6.QtQuick.QSGSimpleRectNode.rect()#
- Return type
Returns the rectangle that this rect node covers.
See also
- PySide6.QtQuick.QSGSimpleRectNode.setColor(color)#
- Parameters
color –
PySide6.QtGui.QColor
Sets the color of this rectangle to color
. The default color will be white.
See also
- PySide6.QtQuick.QSGSimpleRectNode.setRect(rect)#
- Parameters
rect –
PySide6.QtCore.QRectF
Sets the rectangle of this rect node to rect
.
See also
- PySide6.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
.