• 5525阅读
  • 4回复

在QLineEdit 输入完成后 按下回车键 如何触发 pushBtton的click事件。 [复制链接]

上一主题 下一主题
离线lnstree
 

只看楼主 倒序阅读 楼主  发表于: 2013-05-27
关键词: 求助
新手 求教。如题。
离线dbzhang800

只看该作者 1楼 发表于: 2013-05-28
直接调用 click()
离线q3310110

只看该作者 2楼 发表于: 2013-05-28
1. 确定Focus 在LineEdit 内
2.监测KeyEvent

Ada.
And smile smile smile.
离线roywillow

只看该作者 3楼 发表于: 2013-06-30
lineedit有一个按下回车后发送的信号,具体你看看文档吧,我记不清具体是啥了
把这个信号连接到pushbutton的clicked()信号或者直接就是他的槽上就好了
专业维修核潜艇,回收二手航母、二手航天飞机,大修核反应堆,拆洗导弹发动机更换机油,无人侦察机手动挡改自动,航天飞机保养换三滤,飞碟外太空年检 ,各型号导弹加装迎宾踏板,高空作业擦洗卫星表面除尘、打蜡及抛光,东风全系列巡航导弹。并提供原子对撞机。量大从优,有正规发票。
离线ppdayz

只看该作者 4楼 发表于: 2013-06-30
void QLineEdit::returnPressed () [signal]
This signal is emitted when the Return or Enter key is pressed. Note that if there is a validator() or inputMask() set on the line edit, the returnPressed() signal will only be emitted if the input follows the inputMask() and the validator() returns QValidator::Acceptable.


快速回复
限100 字节
 
上一个 下一个