From 92804afdbb75dadfc980bee6eff319e31de571dc Mon Sep 17 00:00:00 2001 From: imn Date: Mon, 1 Feb 2016 11:42:34 +0300 Subject: [PATCH] Fix problem with painting of OCC_Viewer on Qt 5 with OCCT version less 7.0.0 --- src/OCCViewer/OCCViewer_ViewPort.cxx | 2 ++ 1 file changed, 2 insertions(+) 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 ); } -- 2.39.2