0032626: Samples - add Qt::WA_NativeWindow attribute to Qt IESample
authorkgv <kgv@opencascade.com>
Sat, 16 Oct 2021 09:22:12 +0000 (12:22 +0300)
committersmoskvin <smoskvin@opencascade.com>
Mon, 18 Oct 2021 17:14:35 +0000 (20:14 +0300)
samples/qt/Common/src/View.cxx

index 6d76419..60e1161 100755 (executable)
@@ -95,6 +95,7 @@ View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent )
   myCurZoom = 0;
   setAttribute(Qt::WA_PaintOnScreen);
   setAttribute(Qt::WA_NoSystemBackground);
+  setAttribute(Qt::WA_NativeWindow);
 
   myDefaultGestures = myMouseGestureMap;
   myCurrentMode = CurAction3d_Nothing;
@@ -106,8 +107,6 @@ View::View( Handle(AIS_InteractiveContext) theContext, QWidget* parent )
   setBackgroundRole( QPalette::NoRole );//NoBackground );
   // set focus policy to threat QContextMenuEvent from keyboard  
   setFocusPolicy( Qt::StrongFocus );
-  setAttribute( Qt::WA_PaintOnScreen );
-  setAttribute( Qt::WA_NoSystemBackground );
   init();
 }