FluentUI/example/qml-Qt6/page/T_FlipView.qml

118 lines
3.1 KiB
QML
Raw Normal View History

2023-08-24 15:50:37 +08:00
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Window
import FluentUI
2024-01-25 17:26:50 +08:00
import "../component"
2023-08-24 15:50:37 +08:00
FluScrollablePage{
2024-03-09 15:35:48 +08:00
title: qsTr("FlipView")
2023-08-24 15:50:37 +08:00
FluArea{
Layout.fillWidth: true
height: 340
paddings: 10
Layout.topMargin: 20
ColumnLayout{
anchors.verticalCenter: parent.verticalCenter
FluText{
2024-03-09 15:35:48 +08:00
text: qsTr("Horizontal FlipView")
2023-08-24 15:50:37 +08:00
}
FluFlipView{
Image{
source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
source: "qrc:/example/res/image/banner_2.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
source: "qrc:/example/res/image/banner_3.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
}
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluFlipView{
Image{
source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
}
'
}
FluArea{
Layout.fillWidth: true
height: 340
paddings: 10
Layout.topMargin: 20
ColumnLayout{
anchors.verticalCenter: parent.verticalCenter
FluText{
2024-03-09 15:35:48 +08:00
text: qsTr("Vertical FlipView")
2023-08-24 15:50:37 +08:00
}
FluFlipView{
vertical:true
Image{
source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
source: "qrc:/example/res/image/banner_2.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
source: "qrc:/example/res/image/banner_3.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
}
}
}
CodeExpander{
Layout.fillWidth: true
Layout.topMargin: -1
code:'FluFlipView{
vertical:true
Image{
source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
Image{
source: "qrc:/example/res/image/banner_1.jpg"
asynchronous: true
fillMode:Image.PreserveAspectCrop
}
}
'
}
}