diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-17 07:54:16 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2021-09-17 09:41:08 +0200 |
commit | 0055c90694cbf8a82a4c3ee75d47b6d2538f6247 (patch) | |
tree | 848895b863f5fcefcd060664e2e4b9c96b47ac52 /examples | |
parent | b1f8fab93cc0ca5d186730a72ab0b7b9891395c2 (diff) |
Fix Qt Quick painteditem example to work
- Fix the rightAligned property setter to have the same name as
the getter
- Fix the anchor property of the delegate
Fixes warnings
examples/quick/painteditem/main.qml:102:TypeError: 'NoneType' object is not callable
examples/quick/painteditem/main.qml:65: TypeError: Cannot read property 'right' of null
Pick-to: 6.1
Fixes: PYSIDE-1662
Change-Id: Iebd7a9632954fcc2b48e8a56f6e1c20d62b34468
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'examples')
-rw-r--r-- | examples/quick/painteditem/main.qml | 2 | ||||
-rw-r--r-- | examples/quick/painteditem/painteditem.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/examples/quick/painteditem/main.qml b/examples/quick/painteditem/main.qml index 182fdc986..3b5999ae0 100644 --- a/examples/quick/painteditem/main.qml +++ b/examples/quick/painteditem/main.qml @@ -62,7 +62,7 @@ Item { anchors.top: parent.top id: balloonView delegate: TextBalloon { - anchors.right: index % 2 == 0 ? undefined : parent.right + anchors.right: index % 2 == 0 ? undefined : balloonView.contentItem.right height: 60 rightAligned: index % 2 == 0 ? false : true width: balloonWidth diff --git a/examples/quick/painteditem/painteditem.py b/examples/quick/painteditem/painteditem.py index ff744063a..4d49690d8 100644 --- a/examples/quick/painteditem/painteditem.py +++ b/examples/quick/painteditem/painteditem.py @@ -60,7 +60,7 @@ class TextBalloon(QQuickPaintedItem): return self._rightAligned @rightAligned.setter - def rightAlignedSet(self, value): + def rightAligned(self, value): self._rightAligned = value self.rightAlignedChanged.emit() |