Details
-
Task
-
Resolution: Invalid
-
P2: Important
-
None
-
5.6.0, 5.6.3, 5.9.2
Description
If transparent GridView has a big enough background image, scrolling is not smooth. Same happens for ListView even without transparency if there is a big image visible in the UI. This can be reproduced at least on apalis-imx6 and rasperry pi 3 boards.
GridView sample:
import QtQuick 2.0 import QtQuick.Window 2.2 Window { visible: true Image { // Poor performance on 1920x1080 screen: //width: parent.width //height: parent.height // OK performance: width: 1024 height: 512 source: "backImg.jpg" cache: true smooth: false } GridView { id: grid anchors.fill: parent cellWidth: width / 3 cellHeight: cellWidth model: 100; delegate: Rectangle { height: grid.cellHeight width: grid.cellWidth color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1) opacity: 0.5 } } }
ListView sample:
import QtQuick 2.8 import QtQuick.Window 2.2 import QtQuick.Controls 2.1 Window { visible: true id: root Image { id: backImage source: "preview_l.jpg" anchors.fill: parent fillMode: Image.PreserveAspectCrop } ListView{ id: listView model: 100 height: 200 width: root.width orientation: ListView.Horizontal delegate: Rectangle { height: 200 width: 200 color: Qt.rgba(Math.random(), Math.random(), Math.random(), 1) } } Button { text: backImage.visible ? "Hide" : "Show" anchors.top: listView.bottom onClicked: { backImage.visible = !backImage.visible } } }