Results 1 to 20 of 20

Thread: White background in window, getting desperate!

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 284 Times in 279 Posts

    Default Re: White background in window, getting desperate! (now with demonstration program)

    Quote Originally Posted by dictoon View Post
    Hi, thanks for your answer. However, please read the thread from the beginning. I'm blocking the thread (and the event loop) on purpose, in order to demonstrate a problem (bug?) that I have hit with Qt.

    By the way, just to gather some more stats: have you tried the application demonstrating the problem? If so, do you see the window's background being filled to white before the window's content gets rendered? What's your operating system?

    Cheers,
    Franz
    Yes, I have tried this demo and have this same behaviour as fatjuicymole. After changing sleep method all is working perfect.
    On Windows VISTA with AERO background is white, without AERO window have no background. This is a problem with Windows not with Qt.
    And in Yours real application You must blocking event loop with some long process.

  2. #2
    Join Date
    Dec 2009
    Posts
    49
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 2 Times in 1 Post

    Default Re: White background in window, getting desperate! (now with demonstration program)

    Quote Originally Posted by Lesiok View Post
    Yes, I have tried this demo and have this same behaviour as fatjuicymole. After changing sleep method all is working perfect.
    On Windows VISTA with AERO background is white, without AERO window have no background. This is a problem with Windows not with Qt.
    And in Yours real application You must blocking event loop with some long process.
    About the sleep method: again, I inserted calls to Sleep() in order to block the current thread and prevent messages from being processed, *intentionally*. This is just a test app to demonstrate the problem, and make it obvious.

    About Aero: that's very interesting, I didn't think of trying with Aero disabled. So this seems to confirm that it's a Windows bug, and that's it's specific to Vista+Aero. Would love to find a workaround on this platform. Good to know that the problem does not seem to be reproducible on Windows 7.

    Thanks for your input.

    Cheers,
    Franz

  3. #3
    Join Date
    Mar 2008
    Location
    Kraków, Poland
    Posts
    1,540
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanked 284 Times in 279 Posts

    Default Re: White background in window, getting desperate! (now with demonstration program)

    Quote Originally Posted by dictoon View Post
    About the sleep method: again, I inserted calls to Sleep() in order to block the current thread and prevent messages from being processed, *intentionally*. This is just a test app to demonstrate the problem, and make it obvious....
    I know this. Therefore I wrote in my last clause And in Yours real application You must blocking event loop with some long process (called after showing window).

  4. #4
    Join Date
    Dec 2009
    Posts
    49
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows
    Thanks
    3
    Thanked 2 Times in 1 Post

    Default Re: White background in window, getting desperate! (now with demonstration program)

    Quote Originally Posted by Lesiok View Post
    I know this. Therefore I wrote in my last clause And in Yours real application You must blocking event loop with some long process (called after showing window).
    Of course in my real app I don't have any sleep(), nor do I have any long process running I just have a very basic window, with half a dozen very basic controls. It's just that this window (like all windows of my application) has a dark gray background, and when I bring it to the screen -- by calling show() on it -- there's a very noticeable, very disturbing white flash due to the fact that the window first appears with a completely white background, leaving a small delay until the real window contents gets rendered.

    Cheers,
    Franz

Similar Threads

  1. How to set Qt window transparent?
    By montylee in forum Qt Programming
    Replies: 17
    Last Post: 24th December 2013, 21:11
  2. Replies: 2
    Last Post: 9th August 2009, 23:08
  3. Window Background
    By QbelcorT in forum Qt for Embedded and Mobile
    Replies: 1
    Last Post: 23rd September 2008, 07:03
  4. Background image for main window widget using css.
    By Enygma in forum Qt Programming
    Replies: 8
    Last Post: 23rd August 2007, 16:40
  5. Replies: 15
    Last Post: 23rd March 2007, 17:16

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.