Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
How can I catch a return press keyboard event in a line edit in Qt ?
return
连接到returnPressed信号。
returnPressed
http://doc.qt.io/qt-4.8/qlineedit.html#returnPressed
对于所有想要捕捉另一个键盘事件的人 - 使用eventFilter. (如果安德鲁return的QLineEdit回答比我的好)。
eventFilter
QLineEdit