Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Terrible flickering with Qt  (Read 2191 times)

0 Members and 2 Guests are viewing this topic.

MegaByte

  • Newbie
  • *
  • Posts: 2
    • View Profile
Terrible flickering with Qt
« on: April 22, 2009, 03:42:28 am »
Using SFML 1.4 and Qt 4.5, I compiled (MSVC 2008 SP1) and ran the example app found here: http://www.sfml-dev.org/tutorials/1.4/graphics-qt.php

It works, but I am getting a constant terrible flickering (between the Qt background and SFML canvas), such that it is entirely unusable. If I turn off the update timer (QSFMLCanvas.cpp line 81), the flickering stops (but so do the updates, of course). Has something changed in Qt that makes the example not work properly, or is the example deficient? Any ideas?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Terrible flickering with Qt
« Reply #1 on: April 22, 2009, 07:42:49 am »
Something has changed, I have to update the tutorial and sample.

Someone on the french forum found a fix, if I remember correctly it was about implementing the virtual painter() function and make it return 0.
Laurent Gomila - SFML developer

MegaByte

  • Newbie
  • *
  • Posts: 2
    • View Profile
Terrible flickering with Qt
« Reply #2 on: April 22, 2009, 10:35:34 pm »
Yes, it looks like you have to add

virtual QPaintEngine* paintEngine() const {return 0;};

to the class.

 

anything