mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-23 19:20:59 +08:00
49 lines
1020 B
QML
49 lines
1020 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
|
|
saveFolder: FluTools.getApplicationDirPath()+"/screenshot"
|
|
onCaptrueCompleted:
|
|
(captrue)=>{
|
|
|
|
//C:/Users/zhuzi/Pictures/1692283885126.png
|
|
image.source = captrue
|
|
}
|
|
}
|
|
}
|