Swipe View showing more than one page
Solved
QML and Qt Quick
-
Hi, I'm trying to create SwipeView that doesn't fill whole windown and when I create it inside Rectangle that isn't size of the window, previous and next site is also visible and I have no idea why it's happening.
import QtQuick 2.14 import QtQuick.Window 2.14 import QtQuick.Controls 2.14 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") Rectangle{ id: rectId anchors.centerIn: parent width: 200 height: 480 SwipeView { id: view anchors.fill: parent currentIndex: 1 Component.onCompleted: forceActiveFocus() Rectangle { color: "red" width: 200 height: 400 } Rectangle { color: "green" width: 200 height: 400 } Rectangle { color: "blue" width: 200 height: 400 } } PageIndicator { id: indicator count: view.count currentIndex: view.currentIndex anchors.bottom: view.bottom anchors.horizontalCenter: parent.horizontalCenter } } }