From: imn Date: Mon, 1 Feb 2016 08:42:34 +0000 (+0300) Subject: Fix problem with painting of OCC_Viewer on Qt 5 with OCCT version less 7.0.0 X-Git-Tag: V8_0_0rc1~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fimn%2Ffix_occ_viewer;p=modules%2Fgui.git Fix problem with painting of OCC_Viewer on Qt 5 with OCCT version less 7.0.0 --- diff --git a/src/OCCViewer/OCCViewer_ViewPort.cxx b/src/OCCViewer/OCCViewer_ViewPort.cxx index ad4de604e..2648f3ec9 100755 --- a/src/OCCViewer/OCCViewer_ViewPort.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort.cxx @@ -218,7 +218,9 @@ void OCCViewer_ViewPort::initialize() setBackgroundRole( QPalette::NoRole );//NoBackground ); // set focus policy to threat QContextMenuEvent from keyboard setFocusPolicy( Qt::StrongFocus ); +#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) && OCC_VERSION_LARGE < 0x07000000 setAttribute( Qt::WA_PaintOnScreen ); +#endif setAttribute( Qt::WA_NoSystemBackground ); }