//var positionInRoot = tableView.mapToItem(tableView, mouse.x, mouse.y)
var positionInWindow = wrapper.mapToItem(tableView, press_pos.x, press_pos.y)
//var globalPosition = wrapper.mapToGlobal(mouse.x, mouse.y)
//console.log("到当前Rectangle左上角的距离" + positionInRoot )
//console.log("到窗口左上角的距离" + positionInWindow)
//console.log("到屏幕左上角的距离" + globalPosition)
qml 窗口坐标转换
最新推荐文章于 2024-04-01 19:01:59 发布