Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.6, 6.7
-
None
-
Tested on both Linux and Windows, using Qt 6.6 and Qt 6.7. The current dev branch is also tested and can confirm to reproduce the issue.
Description
Steps to reproduce:
1. Save the following code as `Main.qml`
2. Use the `qml` executable to view this file by executing: `qml Main.qml`
3. Click the PageIndicator dots on the bottom of the window, you can see the SwipeView will set to the corresponding page (top-left corner shows the index of the current page, and there is also a debug text in the center of the window, shows the current index of the view and the page indicator), so far it works as intended
4. Use mouse and right click on the SwipeView
5. Repeat step 3, you will notice the top-left corner no longer match the actual current index, which is the bug.
6. Use mouse drag the swipe view to swipe the page, after that, everything goes back to normal again.
import QtQuick import QtQuick.Controls Window { width: 640 height: 480 visible: true title: qsTr("Test bug") SwipeView { id: view anchors.fill: parent // currentIndex: indicator.currentIndex Repeater { model: 6 Text { text: index font.pointSize: 30 } } } PageIndicator { id: indicator interactive: true count: view.count currentIndex: view.currentIndex onCurrentIndexChanged: () => { view.setCurrentIndex(currentIndex) // debug purpose let debugText = `current index changed to ${currentIndex}, view.currentIndex: ${view.currentIndex}` text.text = debugText console.log(debugText) } anchors.bottom: view.bottom anchors.horizontalCenter: parent.horizontalCenter } // for debug purpose Text { id: text anchors.fill: parent horizontalAlignment: Text.AlignHCenter verticalAlignment: Text.AlignVCenter } }
Let me know if you need any additional information.