【发布时间】:2018-04-06 15:56:06
【问题描述】:
我有一个宽度为 1(一条线)的 Rectangle,它应该是可拖动的:
Rectangle {
id: recMark
border.width: 0
width: 1
height: parent.height
y: 0
color: "red"
opacity: 0.3
visible: true
MouseArea {
anchors.fill: parent
drag.target: recMark
drag.axis: Drag.XAxis
}
}
是否可以将鼠标区域扩展到矩形之外,例如周围有3个像素?显然,用鼠标点击正确的像素是很困难的。
【问题讨论】: