In questa pagina

QSGRectangleNode Class

La classe QSGRectangleNode è una classe di utilità che consente di disegnare rettangoli con riempimento pieno utilizzando lo scenegraph. Per saperne di più...

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

Funzioni pubbliche

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)

Descrizione dettagliata

Documentazione delle funzioni membro

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

Elimina l'istanza di ` QSGRectangleNode`. Questo distruttore è virtuale.

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

Restituisce il colore di questo rettangolo.

Vedi anche setColor().

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

Restituisce il rettangolo che questo nodo "rect" copre.

Vedi anche setRect().

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

Imposta il colore di questo rettangolo su color. Il colore predefinito sarà il bianco.

Vedi anche color().

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

Imposta il rettangolo di questo nodo "rect" su rect.

Vedi anche rect().

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

Imposta il rettangolo di questo nodo "rect" in modo che inizi in (x, y) e abbia larghezza w e altezza h.

Si tratta di una funzione sovraccaricata.

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