QT中QLineEdit的editingFinished()信号在按下回车时会触发两次的解决办法

class MyLineEdit :

public QLineEdit {

Q_OBJECT

public: MyLineEdit(QWidget * parent = 0) : QLineEdit(parent) {}

~MyLineEdit(){}

protected: virtual void focusOutEvent(QFocusEvent * e) {

if (e->reason() == Qt::ActiveWindowFocusReason)

{

return; }

else {

QLineEdit::focusOutEvent(e); }

}

};

上一篇:Hadoop2.7.6_08_Federation联邦机制


下一篇:play项目部署