Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-34054

Regression: background of transparent window is not cleared before call to paintEvent()

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • 5.2.0 Beta1
    • 5.1.0
    • Widgets: Main Window
    • None
    • OSX 10.8.5

    Description

      the background of transparent windows is not cleared to tranparency before paintEvent() is called. I could not find any method to clear it to full transparency before drawing my own semi transparent background. so i have no workaround.
      it worked in Qt 4.8.4.
      when you start the sample program, you first get a window as in img 1. note: you even get this if you have NOT reimplemented paintEvent() at all! The contents just happens to be nearly what is expected because probably the same buffer is used as for creating the background image from file just before. The widget already contains these pixels when paintEvent() is entered.
      if you enlarge the window, (adding transparent pixels only, so don't be too astonished) the background is drawn as desired, see img 2. note the difference to img 1, which is probably due to one of both being premultiplied alpha and the other not.
      If you shring the window again you get what is seen in img 3, revealing the not erased background of the window.

      Attachments

        1. img1.png
          58 kB
          Günter Woigk
        2. img2.png
          57 kB
          Günter Woigk
        3. img 2-1.png
          129 kB
          Günter Woigk
        4. img 2-2.png
          57 kB
          Günter Woigk
        5. img 2-3.png
          134 kB
          Günter Woigk
        6. img 2-4.png
          57 kB
          Günter Woigk
        7. img3.png
          72 kB
          Günter Woigk
        8. test-lenslok.zip
          53 kB
          Günter Woigk
        9. test-lenslok 2.zip
          191 kB
          Günter Woigk
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            kio Günter Woigk
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes