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

QQuickPaintedItem directly used, will grow infinite memory

XMLWordPrintable

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

      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.

       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:

                There are no open Gerrit changes