Reputation: 918
Can you please help me how to find a full list of signals which QWidget sends?
For example, QPushButton
sends "clicked()"
when it is clicked. I tried to find which signal button sends when key is pressed but I couldn't.
Upvotes: 3
Views: 3524
Reputation: 206909
Just read the QPushButton
documentation. Either it has a "Signals" section, which will list its own signals and a link to its ancestors signals, or it doesn't define signals of its own and you should look at the "Additional Inherited Members" section. (Same for all other Qt classes.)
For QPushButton
, the only four widget signals (apart from those of QWidget
and QObject
) are the signals inherited from QAbstractButton
:
clicked(bool checked=false)
pressed()
released()
toggled(bool)
Read the respective signal documentation for details. In other words, there are no specific slots for the action triggered on a button when you press a key. You'll need to implement key event handlers if you need specific behavior for that.
Upvotes: 4