File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 22# -*- coding: utf-8 -*-
33import math
44
5- from Qt import QtGui , QtCore , QtWidgets , QtOpenGL
5+ import Qt
6+ from Qt import QtGui , QtCore , QtWidgets
7+
8+ # use QOpenGLWidget instead of the deprecated QGLWidget to avoid probelms with Wayland
9+ if Qt .IsPySide2 :
10+ from PySide2 .QtWidgets import QOpenGLWidget
11+ elif Qt .IsPyQt5 :
12+ from PyQt5 .QtWidgets import QOpenGLWidget
613
714from .dialogs import BaseDialog , FileDialog
815from .scene import NodeScene
@@ -1150,6 +1157,4 @@ def clear_key_state(self):
11501157 self .ALT_state = False
11511158
11521159 def use_OpenGL (self ):
1153- format = QtOpenGL .QGLFormat (QtOpenGL .QGL .SampleBuffers )
1154- format .setSamples (4 )
1155- self .setViewport (QtOpenGL .QGLWidget (format ))
1160+ self .setViewport (QOpenGLWidget ())
You can’t perform that action at this time.
0 commit comments