Display problem

  • Hello,

    I'm developping a game with Qt + Sfml, and I encountered a problem conerning the display, the screen flashes when these attributs are not setted:

    But when I set them, there'se no problem conerning the blink.

    When I display a window in the middle of the sfml widget, there's no problem, but when I hide it and show an other, I see the new window opened with the old window in background, it's like these attributes dont clear the background when a window is hidden.

    I don't know how to solve this problem, could you help me ?

    Thanks for my english.

  • Only top-level Qt widgets have an associated native window. Child widgets don't draw a background because they assume their top-level parent widget will do so. For those widgets to be shown over a sfml widget, try forcing them to have a native window using:


  • A variable menuGame contain the canvas (sfml screen) and others widgets that are displaying above the canvas, I set this attribute to the global widget menuGame and the child widget both before and after but it doesnt change nothing.

    By the way thanks for your fast answer.

  • Does anyone has an idea about this subject ? Maybe why Bradley's solution doesnt work or have an other one ?

  • nobody knows ?

  • I doesn't know if anyone already had the same problem, or if the major part of you didn't get the point, or if it's because nobody had this problem and can't solve it.

    I feel quiet alone here x).

Log in to reply