QT控件pushbutton绑定按键return

问题描述:点击按钮确定有点不得劲,如果能敲回车键就好了。记录一下今天新找到的办法。

代码:

控件ui->sent

ui->sent->setShortcut(Qt::Key_Return);

猜你喜欢

转载自blog.csdn.net/m0_51650696/article/details/142858413