We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9dae5a0 + ba6edeb commit 63ea968Copy full SHA for 63ea968
NodeGraphQt/widgets/viewer.py
@@ -2,7 +2,14 @@
2
# -*- coding: utf-8 -*-
3
import math
4
5
-from Qt import QtGui, QtCore, QtWidgets, QtOpenGL
+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
13
14
from .dialogs import BaseDialog, FileDialog
15
from .scene import NodeScene
@@ -1150,6 +1157,4 @@ def clear_key_state(self):
1150
1157
self.ALT_state = False
1151
1158
1152
1159
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())
0 commit comments