内容表

上一话题

QSGOpacityNode

下一话题

QSGSimpleTextureNode

QSGSimpleRectNode

QSGSimpleRectNode class is a convenience class for drawing solid filled rectangles using scenegraph. 更多

Inheritance diagram of PySide2.QtQuick.QSGSimpleRectNode

概要

函数

详细描述

警告

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() or createRectangleNode() .

class 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.

另请参阅

setColor()

PySide2.QtQuick.QSGSimpleRectNode. rect ( )
返回类型

QRectF

Returns the rectangle that this rect node covers.

另请参阅

setRect()

PySide2.QtQuick.QSGSimpleRectNode. setColor ( color )
参数

color QColor

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

另请参阅

color()

PySide2.QtQuick.QSGSimpleRectNode. setRect ( rect )
参数

rect QRectF

Sets the rectangle of this rect node to rect .

另请参阅

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 .