qt按钮发出多个信号 [英] qt button to emit multiple signals

查看:431
本文介绍了qt按钮发出多个信号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一个Qt(我使用Qt 4.7.1)小部件会在按下时发出信号(第一次时不仅发出信号),并在用户释放鼠标时停止发出信号?像是标准间隔内的mousedown事件? 还是我必须用qtimer来实现呢? 谢谢

is there a Qt (I use Qt 4.7.1) widget that emit signals (not just one at the first time) while it is pressed and stops when the user releases the mouse? something like mousedown events in standard intervals? or do I have to implement this with a qtimer? thanks

推荐答案

查看

Check out QAbstractButton::autoRepeat and autoRepeatInterval. It should be exactly what you need and is available for all buttons.

这篇关于qt按钮发出多个信号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆