- class QSGSimpleRectNode¶
The
QSGSimpleRectNode
class is a convenience class for drawing solid filled rectangles using scenegraph. More…Synopsis¶
Methods¶
def
__init__()
def
color()
def
rect()
def
setColor()
def
setRect()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
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
viacreateRectangleNode()
. However, this standalone class is still useful when used via subclassing and the application knows that no special scenegraph backends will be involved.- __init__()¶
Constructs a
QSGSimpleRectNode
instance with an empty rectangle and white color.Constructs a
QSGSimpleRectNode
instance which is spanningrect
with the colorcolor
.Returns the color of this rectangle.
See also
Returns the rectangle that this rect node covers.
See also
Sets the color of this rectangle to
color
. The default color will be white.See also
Sets the rectangle of this rect node to
rect
.See also
- 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 widthw
and heighth
.