From 315e0521c9b65a83a6b034dbe9d3c344b1959049 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 3 Mar 2010 10:11:54 +0000 Subject: [PATCH] From Martin Beckett, "I tested DJ's fix to stop flicker on Windows + Qt viewer on 2.6.7 It solves the problem on XP and Win7 on Qt 4.5 and 4.62 It isn't necessary on Linux (ubuntu 8.10/9.04 Qt 4.5/4.6.2) but doesn't cause any harm. But I have #ifdef'ed it with WIN32. I can't test it on 64bit windows (not sure if x64 defines WIN32?)" --- examples/osgviewerQT/QOSGWidget.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/examples/osgviewerQT/QOSGWidget.cpp b/examples/osgviewerQT/QOSGWidget.cpp index 68912a04b..e89a5d99d 100644 --- a/examples/osgviewerQT/QOSGWidget.cpp +++ b/examples/osgviewerQT/QOSGWidget.cpp @@ -91,6 +91,11 @@ class QOSGWidget : public QWidget osgViewer::GraphicsWindow* getGraphicsWindow() { return _gw.get(); } const osgViewer::GraphicsWindow* getGraphicsWindow() const { return _gw.get(); } +#ifdef WIN32 + // Prevent flicker on Windows Qt + QPaintEngine* paintEngine () const { return 0; } +#endif + protected: void init();