Improve import
Use Qt.IsPySide2 / Qt.IsPyQt5 rather than try/except
# -*- coding: utf-8 -*-
import math
+import Qt
from Qt import QtGui, QtCore, QtWidgets
-try:
+# use QOpenGLWidget instead of the deprecated QGLWdiegt to avoid probelms with Wayland
+if Qt.IsPySide2:
from PySide2.QtWidgets import QOpenGLWidget
-except Exception:
+elif Qt.IsPyQt5:
from PyQt5.QtWidgets import QOpenGLWidget
from .dialogs import BaseDialog, FileDialog
