kivy是否支持在鼠标改变时触发的MouseEvent而不按鼠标键?在
我在文件中发现:
def on_motion(self, etype, motionevent): # will receive all motion events. pass Window.bind(on_motion=on_motion)
You can also listen to changes of the mouse position by watching mouse_pos.
但是我不能实现它。我设法将它绑定并添加到on_motion函数“print('Hello world')”,但它只由按type events触发。在
提前谢谢
你实际上想做的是:
解决方案
将
mouse_pos
绑定到回调。详情请参考示例。在示例
在主.py在
^{pr2}$输出
相关问题 更多 >
编程相关推荐