aboutsummaryrefslogtreecommitdiffstats
path: root/examples/3d
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2021-04-29 10:09:33 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2021-04-29 13:21:52 +0200
commitdf43156bb35a442c4988631e1c2b0bd0fc11e618 (patch)
tree77e6c531967013e5628f04e48ba035197b8a737c /examples/3d
parent130e79e4658d2438f66ab8aeb5e186349e3cb740 (diff)
Examples: Fix some space-related flake warnings
Task-number: PYSIDE-1112 Change-Id: Ib8991199e4822673d6a25cba0023dbe3b03f5938 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'examples/3d')
-rw-r--r--examples/3d/simple3d/simple3d.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/3d/simple3d/simple3d.py b/examples/3d/simple3d/simple3d.py
index ab6dc0ca0..15bd1600b 100644
--- a/examples/3d/simple3d/simple3d.py
+++ b/examples/3d/simple3d/simple3d.py
@@ -42,11 +42,12 @@
"""PySide6 port of the qt3d/simple-cpp example from Qt v5.x"""
import sys
-from PySide6.QtCore import(Property, QObject, QPropertyAnimation, Signal)
+from PySide6.QtCore import (Property, QObject, QPropertyAnimation, Signal)
from PySide6.QtGui import (QGuiApplication, QMatrix4x4, QQuaternion, QVector3D)
from PySide6.Qt3DCore import (Qt3DCore)
from PySide6.Qt3DExtras import (Qt3DExtras)
+
class OrbitTransformController(QObject):
def __init__(self, parent):
super().__init__(parent)
@@ -91,6 +92,7 @@ class OrbitTransformController(QObject):
angle = Property(float, getAngle, setAngle, notify=angleChanged)
radius = Property(float, getRadius, setRadius, notify=radiusChanged)
+
class Window(Qt3DExtras.Qt3DWindow):
def __init__(self):
super().__init__()
@@ -155,6 +157,7 @@ class Window(Qt3DExtras.Qt3DWindow):
self.sphereEntity.addComponent(self.sphereTransform)
self.sphereEntity.addComponent(self.material)
+
if __name__ == '__main__':
app = QGuiApplication(sys.argv)
view = Window()