QSGSimpleRectNodeclass is a convenience class for drawing solid filled rectangles using scenegraph. 更多 …
警告
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凭借createRectangleNode()orcreateRectangleNode().
QSGSimpleRectNode
¶
QSGSimpleRectNode(rect, color)
- param color
QColor- param rect
QRectF
构造
QSGSimpleRectNode
instance with an empty rectangle and white color.
构造
QSGSimpleRectNode
instance which is spanning
rect
with the color
color
.
PySide2.QtQuick.QSGSimpleRectNode.
color
(
)
¶
QColor
Returns the color of this rectangle.
另请参阅
PySide2.QtQuick.QSGSimpleRectNode.
rect
(
)
¶
QRectF
Returns the rectangle that this rect node covers.
另请参阅
PySide2.QtQuick.QSGSimpleRectNode.
setColor
(
color
)
¶
color
–
QColor
Sets the color of this rectangle to
color
. The default color will be white.
另请参阅
PySide2.QtQuick.QSGSimpleRectNode.
setRect
(
rect
)
¶
rect
–
QRectF
Sets the rectangle of this rect node to
rect
.
另请参阅
PySide2.QtQuick.QSGSimpleRectNode.
setRect
(
x
,
y
,
w
,
h
)
¶
x
–
qreal
y
–
qreal
w
–
qreal
h
–
qreal
这是重载函数。
Sets the rectangle of this rect node to begin at (
x
,
y
) and have width
w
and height
h
.