-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
5.15.13, 6.4.2
-
None
-
Ubuntu 24.04.
When a SwipeView is instantiated, it doesn't resize its items until it is resized itself.
import QtQuick 2.15 import QtQuick.Window 2.15 import QtQuick.Controls 2.15 Window { visible: true width: 640 height: 480 Button { text: "Resize swipeview" onClicked: swipeView.height += 1 } SwipeView { id: swipeView x: 195 y: 133 width: 200 height: 200 interactive: true Item { Text { id: text1 text: qsTr("Hello") } } Item { Text { id: text2 text: qsTr("Bye") } } } }
Before clicking on "Resize swipeview", the two texts are stacked on top of each others, and the Items have a size of 0.
After forcing a layout of its content by resizing the SwipeView, both items have a more correct size of 200x201 and 200x202 (I can't explain why its not 200x200 but that's not my focus here).