• 7189阅读
  • 3回复

关于clicked(bool)等信号里的bool... [复制链接]

上一主题 下一主题
离线wato
 
只看楼主 倒序阅读 楼主  发表于: 2009-08-06


     我以前一直以为是按下按钮的时候  clicked(bool), toggled(bool)等类似的这些信号发送的bool值是在true  false之前轮流切换的


但我今天作了个小实验  好像clicked(bool)信号不管我怎么按pushbutton它发送的都是false阿

     请大家指点下....
离线duduqq

只看该作者 1楼 发表于: 2009-08-06
void QAbstractButton::clicked ( bool checked = false )   [signal]

This signal is emitted when the button is activated (i.e. pressed down then released while the mouse cursor is inside the button), when the shortcut key is typed, or when click() or animateClick() is called. Notably, this signal is not emitted if you call setDown(), setChecked() or toggle().

If the button is checkable, checked is true if the button is checked, or false if the button is unchecked.
离线wato
只看该作者 2楼 发表于: 2009-08-06
谢谢楼上的!

还有一个一直很模糊的问题: checkable 属性影响到控件的什么?
离线beajisong

只看该作者 3楼 发表于: 2009-08-08
是否可以转换状态
比如可以打钩,选择,或者压下
快速回复
限100 字节
 
上一个 下一个