File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535log = logging .getLogger (__name__ )
3636
3737
38- class qtBaseViewer (QtWidgets .QOpenGLWidget ):
38+ class qtBaseViewer (QtWidgets .QWidget ):
3939 ''' The base Qt Widget for an OCC viewer
4040 '''
4141
@@ -48,6 +48,9 @@ def __init__(self, parent=None):
4848 self .setMouseTracking (True )
4949 # Strong focus
5050 self .setFocusPolicy (QtCore .Qt .WheelFocus )
51+
52+ # force creation of native window
53+ self .setAttribute (QtCore .Qt .WA_NativeWindow )
5154
5255 # required for overpainting the widget
5356 self .setAttribute (QtCore .Qt .WA_PaintOnScreen )
@@ -185,7 +188,7 @@ def paintEvent(self, event):
185188 if self ._inited :
186189 self ._display .Context .UpdateCurrentViewer ()
187190 # important to allow overpainting of the OCC OpenGL context in Qt
188- self .swapBuffers ()
191+ # self.context() .swapBuffers()
189192
190193 if self ._drawbox :
191194 painter = QtGui .QPainter (self )
You can’t perform that action at this time.
0 commit comments