diff options
Diffstat (limited to 'examples/plot3dSceneWindow.py')
-rw-r--r-- | examples/plot3dSceneWindow.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/plot3dSceneWindow.py b/examples/plot3dSceneWindow.py index cf6f209..5e78aa6 100644 --- a/examples/plot3dSceneWindow.py +++ b/examples/plot3dSceneWindow.py @@ -57,7 +57,7 @@ from silx.gui.widgets.BoxLayoutDockWidget import BoxLayoutDockWidget SIZE = 1024 # Create QApplication -qapp = qt.QApplication([]) +qapp = qt.QApplication.instance() or qt.QApplication([]) # Create a SceneWindow widget window = SceneWindow() @@ -83,6 +83,7 @@ window.addDockWidget(qt.Qt.BottomDockWidgetArea, dock) img = numpy.random.random(3 * SIZE ** 2).reshape(SIZE, SIZE, 3) # Dummy image imageRgba = sceneWidget.addImage(img) # Add ImageRgba item to the scene +imageRgba.setLabel('Random RGBA image') # Set name displayed in parameter tree # Set imageRgba transform imageRgba.setTranslation(SIZE*.15, SIZE*.15, 0.) # Translate the image |