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

Link cachebuffer system to an other Flickable

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 5.7.0 Alpha
    • None
    • Windows
      Android

    Description

      Currently, if a GridView or ListView (with interactive = false) inside an other Flickable, the cacheBuffer isn't working.

      It wouold be great if we can delegate the cacheBuffer system to this other Flickable.

      There is a common use case where the cacheBuffer isn't working. In Android, it makes a black screen if the gridView loaded to much images.

      Flickable {
      	id: superFlickable
      	anchors.fill: parent
      	contentWidth: column.width; contentHeight: column.height
      	interactive : true
      	
      	// progressive loading
      	onMovementEnded: { 
      		if (contentHeight - contentY - height < 100)
      			grid.loadNext();
      	}
      	
      	Column {
      		id: column
      		width: parent.width
      		
      		Rectangle {
      			id: something
      			width: parent.width
      			height: 50
      			color: "black"
      			
      			Text {
      				text: "Hello"
      				anchors.centerIn: parent
      			}
      		}
      		
      		GridView {
      			id: grid
      			width: parent.width
      			height: contentHeight
      			interactive: false
      			cacheBuffer: 0 // not working
      			
      			cellWidth: 50
      			cellHeight: 50
      			
      			model: ListModel {
      				id: picList
      			}
      			
      			delegate: Component {
      			
      				Loader {
      					width: grid.cellWidth
      					height: grid.cellHeight
      					asynchronous: true
      					visible: status == Loader.Ready
      
      					sourceComponent: Component {
      
      						Image {
      							anchors.fill: parent
      							source: _source
      						}
      					}
      				}
      			}
      			
      			function loadNext() {
      				// http request to populate the gridview
      			}
      		}
      	}
      }
      

      Attachments

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

        Activity

          People

            laknoll Lars Knoll
            vkaestle67 Vincent Kaestle
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes