Details
-
Bug
-
Resolution: Cannot Reproduce
-
Not Evaluated
-
None
-
5.0.2
-
None
-
mingw4.7
Windows XP
Qt5.0.2
Qt Creator 2.7.0
Description
code is quite simple, just a ListView and a delegate which's duty is to show the image from the model's data(src).
the running of qml is ok, but when we flick the listview as many as times, i found the using memory is increased without a limit. it's possiable increase to 1GB if we try as many as times.
attachmemt is the code.
the code is show as follow :
import QtQuick 2.0 Rectangle { id : viewer width: 800 height: 480 function addItem() { picSrcList.append({"src":"file:///e:/pic/more/02z.jpg"}); picSrcList.append({"src":"file:///e:/pic/more/01.jpg"}); picSrcList.append({"src":"file:///e:/pic/more/02.jpg"}); picSrcList.append({"src":"file:///e:/pic/more/02s.jpg"}); picSrcList.append({"src":"file:///e:/pic/more/3.jpg"}); picSrcList.append({"src":"file:///e:/pic/more/4.jpg"}); picSrcList.append({"src":"file:///e:/pic/more/5.jpg"}); picSrcList.append({"src":"file:///e:/pic/more/6.jpg"}); } ListModel { id : picSrcList } Component { id : picDelegate Image { source: src fillMode: Image.PreserveAspectFit asynchronous: true width: viewer.width height: viewer.height } } ListView { id :picListView anchors.fill: parent delegate: picDelegate model : picSrcList orientation : ListView.Horizontal snapMode: ListView.SnapOneItem } Component.onCompleted: { addItem() } }