Details
-
Bug
-
Resolution: Invalid
-
P2: Important
-
None
-
5.13.0 Beta3
-
KDE Neon 18.04
Description
I stumbled upon a problem using SplitView in my application, and have created a minimal example to reproduce it.
What happens is that the vertical SplitView bar cannot be moved if the ListView is at index 0 or 1. If you press the button "2", the splitter can be moved. Pressing buttons 0 or 1 makes it "locked" again.
The example has a horizontal SplitView, where the left item is a ListView that uses a vertical SplitView in its delegate.
import QtQuick 2.13 import QtQuick.Controls 2.13 import QtQuick.Layouts 1.13 import QtQuick.Window 2.13 ApplicationWindow { visible: true width: 640 height: 480 title: qsTr("Hello World") header: ToolBar { RowLayout { TabBar { id: theTabBar Repeater { model: listView.model delegate: TabButton { text: index onClicked: listView.currentIndex = index } } } } } SplitView { anchors.fill: parent orientation: Qt.Horizontal ListView { id: listView SplitView.fillHeight: true SplitView.fillWidth: true property var colors: ["red","green","blue"] orientation: ListView.Horizontal currentIndex: theTabBar.currentIndex interactive: false highlightMoveDuration: 50 highlightRangeMode: ListView.StrictlyEnforceRange snapMode: ListView.SnapOneItem model: colors.length delegate: Item { width: ListView.view.width height: ListView.view.height SplitView { orientation: Qt.Vertical anchors.fill: parent Rectangle { SplitView.fillHeight: true color: listView.colors[index] Label { anchors.centerIn: parent text: index } } Rectangle { SplitView.minimumHeight: 30 color: "brown" Label { text: "This splitter works fine" } } } } } Rectangle { color: "gray" SplitView.minimumWidth: 300 SplitView.fillWidth: true Label { anchors.fill: parent text: "<-- MOVE THIS\nWorks if button 2 is pressed\nDoes not work with button 0" } } } }