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
viacreateRectangleNode()
orcreateRectangleNode()
.
- class PySide2.QtQuick.QSGSimpleRectNode¶
PySide2.QtQuick.QSGSimpleRectNode(rect, color)
- param color:
- param rect:
Constructs a
QSGSimpleRectNode
instance with an empty rectangle and white color.Constructs a
QSGSimpleRectNode
instance which is spanningrect
with the colorcolor
.
- PySide2.QtQuick.QSGSimpleRectNode.color()¶
- Return type:
Returns the color of this rectangle.
See also
- PySide2.QtQuick.QSGSimpleRectNode.rect()¶
- Return type:
Returns the rectangle that this rect node covers.
See also
- PySide2.QtQuick.QSGSimpleRectNode.setColor(color)¶
- Parameters:
color –
PySide2.QtGui.QColor
Sets the color of this rectangle to
color
. The default color will be white.See also
- PySide2.QtQuick.QSGSimpleRectNode.setRect(rect)¶
- Parameters:
rect –
PySide2.QtCore.QRectF
Sets the rectangle of this rect node to
rect
.See also
- 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 widthw
and heighth
.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.