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

setStyleSheet with image causes leak.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Cannot Reproduce
    • P3: Somewhat important
    • None
    • 5.5.1
    • Widgets: Style Sheets
    • None

    Description

      If I have a label and I do setStyleSheet("image: url(:/SomeImage.png);") repeatedly on a 1sec periodic timer, I can see the memory usage going up with "top" command. If you want to see the leak happen faster/slower, you can make the timer fire faster/slower accordingly.

      If I replace "image:" with "background-image:", the leak doesn't happen.

      A simple project is attached.

      This is the first time I create a bug report, so correct me if I did anything wrong.

      Observation: I think it's the size of the image that's matter. I tried a really small png image, 124 bytes, in my program and I didn't see the memory creep. So if you can't reproduce the creep with my attached program, please try to replace the image with something bigger.

      Attachments

        1. Leak.7z
          4 kB
          Nhat Nam Trinh
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            richard Richard Moe Gustavsen
            trinhnhatnam Nhat Nam Trinh
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes