Details
-
Bug
-
Resolution: Done
-
P2: Important
-
None
-
5.9.0, 5.9.1
-
None
-
* Windows 7
** MinGW
** {{QT_QUICK_BACKEND=software}}
* Embedded Linux
** Kernel 4.6.0
** ./configure -device linux-zynqmp-g++ \
-device-option CROSS_COMPILE=aarch64-linux-gnu\- \
-linuxfb \
-no-opengl
Description
The example below shows nested ListViews (listView and subListView). The ListView "listView" has a margin of 50 to the window and should clip its content. Clicking through listView shows that clipping breaks. If the ListView "subListView" is removed, the clipping does not break.
Tests have shown that when OpenGL is available everything works as expected. If the software renderer is used instead, clipping breaks as described above.
import QtQuick 2.5 import QtQuick.Window 2.2 Window { visible: true width: 800 height: 600 ListView { id: listView anchors.fill: parent anchors.margins: 50 orientation: ListView.Horizontal snapMode: ListView.SnapOneItem highlightRangeMode: ListView.StrictlyEnforceRange highlightMoveDuration: 200 interactive: false clip: true cacheBuffer: Math.max(0, model.count * width) model: VisualItemModel { ListView { id: subListView width: listView.width height: listView.height clip: true model: VisualItemModel { Rectangle { width: subListView.width height: 70 color: "yellow" } Rectangle { width: subListView.width height: 70 color: "pink" } Rectangle { width: subListView.width height: 70 color: "purple" } } Text { visible: listView.currentItem != parent text: "This text should not be visible but clipped" rotation: 90 font.pixelSize: 20 anchors.right: parent.right anchors.bottom: parent.bottom transformOrigin: Item.TopRight } } Rectangle { color: "green" width: listView.width height: listView.height Text { visible: listView.currentItem != parent text: "This text should not be visible but clipped" rotation: 90 font.pixelSize: 20 anchors.right: parent.right anchors.bottom: parent.bottom transformOrigin: Item.TopRight } Text { visible: listView.currentItem != parent text: "This text should not be visible but clipped" rotation: 90 font.pixelSize: 20 transformOrigin: Item.BottomLeft } } Rectangle { color: "blue" width: listView.width height: listView.height Text { visible: listView.currentItem != parent text: "This text should not be visible but clipped" rotation: 90 font.pixelSize: 20 transformOrigin: Item.BottomLeft } } } } MouseArea { anchors.fill: parent onClicked: listView.currentIndex = (listView.currentIndex + 1) % listView.model.count } }