diff --git a/samples/qt/QSFMLCanvas.cpp b/samples/qt/QSFMLCanvas.cpp index 3baa04666..f4302ee2c 100644 --- a/samples/qt/QSFMLCanvas.cpp +++ b/samples/qt/QSFMLCanvas.cpp @@ -20,6 +20,7 @@ myInitialized (false) { // Setup some states to allow direct rendering into the widget setAttribute(Qt::WA_PaintOnScreen); + setAttribute(Qt::WA_OpaquePaintEvent); setAttribute(Qt::WA_NoSystemBackground); // Set strong focus to enable keyboard events to be received @@ -63,6 +64,15 @@ void QSFMLCanvas::OnUpdate() } +//////////////////////////////////////////////////////////// +/// Return the paint engine used by the widget to draw itself +//////////////////////////////////////////////////////////// +QPaintEngine* QSFMLCanvas::paintEngine() const +{ + return 0; +} + + //////////////////////////////////////////////////////////// /// Called when the widget is shown ; /// we use it to initialize our SFML window diff --git a/samples/qt/QSFMLCanvas.hpp b/samples/qt/QSFMLCanvas.hpp index a129e014b..e02f02636 100644 --- a/samples/qt/QSFMLCanvas.hpp +++ b/samples/qt/QSFMLCanvas.hpp @@ -50,6 +50,12 @@ private : //////////////////////////////////////////////////////////// virtual void OnUpdate(); + //////////////////////////////////////////////////////////// + /// Return the paint engine used by the widget to draw itself + /// + //////////////////////////////////////////////////////////// + virtual QPaintEngine* paintEngine() const; + //////////////////////////////////////////////////////////// /// Called when the widget is shown ; /// we use it to initialize our SFML window