FluentUI/example/qml/page/T_Screenshot.qml
朱子楚\zhuzi b47f2d12ad update
2023-08-17 22:06:26 +08:00

46 lines
892 B
QML

import QtQuick
import QtQuick.Layouts
import QtQuick.Window
import QtQuick.Controls
import FluentUI
import "qrc:///example/qml/component"
FluScrollablePage{
title:"Screenshot"
FluArea{
Layout.fillWidth: true
height: 100
paddings: 10
Layout.topMargin: 20
FluFilledButton{
anchors{
top: parent.top
topMargin: 14
}
text:"Open Screenshot"
onClicked: {
screenshot.open()
}
}
}
Image{
id:image
Layout.preferredHeight: 400
Layout.preferredWidth: 400
fillMode: Image.PreserveAspectFit
}
FluScreenshot{
id:screenshot
captrueMode: FluScreenshotType.File
onCaptrueCompleted:
(captrue)=>{
image.source = captrue
}
}
}