CQLPushButton {
id: button5
x: 4
y: 201
width: 190
height: 90
m_text: qsTr("导出jpg")
onClickedSignal: {
fds.open();
}
}
FileDialog {
id:fds
title: "选择保存文件路径"
folder: shortcuts.desktop
selectExisting: true
selectFolder: true
selectMultiple: false
onAccepted: {
rectangle.grabToImage(function(result) {
var path = fds.fileUrl + "/aa.jpg";
var path1 = path.substring(8,path.length);
console.log(path1);
result.saveToFile( path1);
});
}
}