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

QQuickPaintedItem directly used, will grow infinite memory

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.13.0
    • Quick: Other
    • None
    • Windows

    Description

      I have a class PaintedItem that inherits QQuickPaintedItem, when I using in qml,
      then keep changing the window size,memory will always grow.

      For example, have a class:

      class PaintedItem : public QQuickPaintedItem
      {
         PaintedItem(QQuickItem *parent = nullptr) : QQuickPaintedItem(parent) { }
         void paint(QPainter *painter) 
         {
            //do nothing
         }
      }

      After register in qml:

      Window{
         visible: true
         width: 640
         height: 480
         PaintedItem {
           anchors.fill: parent
         }
      }
      

      Then, constantly changing the size of the window, the memory will grow indefinitely. 

      Qt version is 5.13, but 5.12 is no problem.

       

      Attachments

        1. test.zip
          2 kB
          menv pengsheng
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            w00t Robin Burchell
            menpens menv pengsheng
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes