我以前一直以為是按下按鈕的時候 clicked(bool), toggled(bool)等類似的這些信號發送的bool值是在true false之前輪流切換的但我今天作了個小實驗 好像clicked(bool)信號不管我怎么按pushbutton它發送的都是false阿 請大家指點下....
uj5u.com熱心網友回復:
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.uj5u.com熱心網友回復:
謝謝樓上的!還有一個一直很模糊的問題: checkable 屬性影響到控制元件的什么?uj5u.com熱心網友回復:
是否可以轉換狀態比如可以打鉤,選擇,或者壓下uj5u.com熱心網友回復:
敢問樓上是怎么回答的?
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/73557.html
標籤:其他技術討論專區
上一篇:排序演算法
