aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/customrendernode/customrender.h
diff options
context:
space:
mode:
authorLaszlo Agocs <[email protected]>2023-09-14 14:02:07 +0200
committerLaszlo Agocs <[email protected]>2023-09-25 09:01:17 +0000
commitaeb3bd235a7eaba163b9867b97a9869cc9ecaf7d (patch)
tree27862c5bcca313c51a2bd598698517263c19e209 /examples/quick/scenegraph/customrendernode/customrender.h
parent9000c9f17c66455071c0b7eed0e9168b94c8553d (diff)
Clean up customrendernode example
Make it more consistent with other scenegraph examples, and make it more compact, in particular when it comes to handling the QRhi resources (smart pointers are quite useful in this case since they help dropping a bunch of lines) Expand the docs. Pick-to: 6.6 6.6.0 Change-Id: I97bceca7759db9738d34f0fbf7eb29b0ae6e4c0f Reviewed-by: Christian Strømme <[email protected]>
Diffstat (limited to 'examples/quick/scenegraph/customrendernode/customrender.h')
-rw-r--r--examples/quick/scenegraph/customrendernode/customrender.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/quick/scenegraph/customrendernode/customrender.h b/examples/quick/scenegraph/customrendernode/customrender.h
index ef6c29fa7d..530e692678 100644
--- a/examples/quick/scenegraph/customrendernode/customrender.h
+++ b/examples/quick/scenegraph/customrendernode/customrender.h
@@ -7,6 +7,7 @@
#include <QQuickItem>
#include <QVector2D>
+//![item]
class CustomRender : public QQuickItem
{
Q_OBJECT
@@ -16,11 +17,10 @@ class CustomRender : public QQuickItem
public:
explicit CustomRender(QQuickItem *parent = nullptr);
- const QList<QVector2D> &vertices() const;
+ QList<QVector2D> vertices() const;
void setVertices(const QList<QVector2D> &newVertices);
signals:
-
void verticesChanged();
protected:
@@ -29,5 +29,6 @@ protected:
private:
QList<QVector2D> m_vertices;
};
+//![item]
#endif // CUSTOMRENDER_H