//////
离线
https://stackoverflow.com/questions/9451559/what-is-the-difference-between-clicked-and-pressed-in-qt
Pressed: event is generated when you push down the mouse button
Released: event is generated when you release the mouse button (which has been pressed down before)
Clicked: event is generated when a mouse button Pressed & Released.
With these functions you can create a snap-switch for example:
when you press the button, the light will switch off / the music starts / etc, when you release it, light switches back on / the music starts again etc.
按下:当您按下鼠标按钮时会生成事件
发布:当您释放鼠标按钮(以前已被按下)时会生成事件
点击:当鼠标按钮按下并释放时生成事件。
通过这些功能,您可以创建一个快照开关,例如:
当您按下按钮时,指示灯将关闭/音乐启动/ etc,当您释放它,灯开关重新开始/音乐再次启动等。
离线