6 Star 19 Fork 24

韦东山 / Qtmxapp-desktop

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
CircularImage.qml 947 Bytes
一键复制 编辑 原始数据 按行查看 历史
世玉轩 提交于 2020-06-19 09:31 . init push myir hmi v2.0 gui
import QtQuick 2.6
import QtGraphicalEffects 1.0
//圆角图片
Rectangle {
property alias source: _image.source
radius: 5
color: "transparent"
Image {
id: _image
smooth: true
visible: true
anchors.fill: parent
source: img_src
sourceSize: Qt.size(parent.size, parent.size)
antialiasing: true
// fillMode: Image.Stretch //默认
fillMode: Image.PreserveAspectCrop
// fillMode: Image.PreserveAspectFit
}
// Rectangle {
// id: _mask
// color: "black"
// anchors.fill: parent
// radius: parent.radius
// visible: false
// antialiasing: true
// smooth: true
// }
// OpacityMask {
// id: mask_image
// anchors.fill: _image
// source: _image
// maskSource: _mask
// visible: true
// antialiasing: true
// }
}
C++
1
https://gitee.com/weidongshan/Qtmxapp-desktop.git
git@gitee.com:weidongshan/Qtmxapp-desktop.git
weidongshan
Qtmxapp-desktop
Qtmxapp-desktop
master

搜索帮助