QSGRectangleNode Class

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

头: #include <QSGRectangleNode>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
继承: QSGGeometryNode

公共函数

virtual QColor color () const = 0
virtual QRectF rect () const = 0
virtual void setColor (const QColor & color ) = 0
virtual void setRect (const QRectF & rect ) = 0
void setRect (qreal x , qreal y , qreal w , qreal h )

详细描述

成员函数文档编制

[pure virtual] QColor QSGRectangleNode:: color () const

Returns the color of this rectangle.

另请参阅 setColor ().

[pure virtual] QRectF QSGRectangleNode:: rect () const

Returns the rectangle that this rect node covers.

另请参阅 setRect ().

[pure virtual] void QSGRectangleNode:: setColor (const QColor & color )

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

另请参阅 color ().

[pure virtual] void QSGRectangleNode:: setRect (const QRectF & rect )

Sets the rectangle of this rect node to rect .

另请参阅 rect ().

void QSGRectangleNode:: setRect ( qreal x , qreal y , qreal w , qreal h )

这是重载函数。

Sets the rectangle of this rect node to begin at ( x , y ) and have width w 和高度 h .