Auf dieser Seite

QSGRectangleNode Class

Die Klasse „QSGRectangleNode“ ist eine Hilfsklasse zum Zeichnen von vollständig gefüllten Rechtecken mithilfe von Scenegraph. Mehr dazu...

Header: #include <QSGRectangleNode>
CMake: find_package(Qt6 REQUIRED COMPONENTS Quick)
target_link_libraries(mytarget PRIVATE Qt6::Quick)
qmake: QT += quick
Erbt von: QSGGeometryNode

Öffentliche Funktionen

virtual ~QSGRectangleNode() override
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)

Ausführliche Beschreibung

Dokumentation der Mitgliedsfunktionen

[override virtual noexcept default] QSGRectangleNode::~QSGRectangleNode()

Löscht die Instanz von ` QSGRectangleNode`. Dieser Destruktor ist virtuell.

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

Gibt die Farbe dieses Rechtecks zurück.

Siehe auch „ setColor()“.

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

Gibt das Rechteck zurück, das dieser „rect“-Knoten abdeckt.

Siehe auch ` setRect()`.

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

Legt die Farbe dieses Rechtecks auf „ color “ fest. Die Standardfarbe ist Weiß.

Siehe auch color().

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

Setzt das Rechteck dieses „rect“-Knotens auf „ rect “.

Siehe auch „ rect()“.

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

Legt fest, dass das Rechteck dieses „rect“-Knotens bei (x, y) beginnt und eine Breite von w sowie eine Höhe von h hat.

Dies ist eine überladene Funktion.

© 2026 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.