aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.py')
-rw-r--r--examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.py b/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.py
index 164d6a08c..6f1e61f94 100644
--- a/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.py
+++ b/examples/quick/rendercontrol/rendercontrol_opengl/window_singlethreaded.py
@@ -3,20 +3,17 @@
import numpy
from pathlib import Path
-import sys
import weakref
from OpenGL.GL import (GL_TEXTURE_MAG_FILTER, GL_TEXTURE_MIN_FILTER,
GL_NEAREST, GL_RGBA, GL_TEXTURE_2D, GL_UNSIGNED_BYTE)
-from PySide6.QtGui import (QMatrix4x4, QMouseEvent, QOffscreenSurface,
- QOpenGLContext, QOpenGLFunctions, QScreen, QSurface,
+from PySide6.QtGui import (QMouseEvent, QOffscreenSurface,
+ QOpenGLContext, QSurface,
QSurfaceFormat, QWindow)
-from PySide6.QtOpenGL import (QOpenGLFramebufferObject, QOpenGLTexture,
- QOpenGLShaderProgram, QOpenGLVertexArrayObject,
- QOpenGLBuffer)
+from PySide6.QtOpenGL import QOpenGLFramebufferObject
from PySide6.QtQml import QQmlComponent, QQmlEngine
from PySide6.QtQuick import (QQuickGraphicsDevice,
- QQuickItem, QQuickRenderControl,
+ QQuickRenderControl,
QQuickRenderTarget, QQuickWindow)
from PySide6.QtCore import QCoreApplication, QTimer, QUrl, Slot
from shiboken6 import VoidPtr
@@ -250,7 +247,7 @@ class WindowSingleThreaded(QWindow):
# If self is a resize after the scene is up and running, recreate the
# texture and the Quick item and scene.
if (self.texture_id()
- and self.m_textureSize != self.size() * self.devicePixelRatio()):
+ and self.m_textureSize != self.size() * self.devicePixelRatio()):
self.resizeTexture()
@Slot()