inputRejected signal not found

余生颓废 提交于 2019-12-11 05:35:26

问题


ALL,

connect(this, &QLineEdit::inputRejected,
        this, &this::my_handler);

Qt 5.7.1 on Gentoo Linux

error: 'inputRejected' is not a member of 'QLineEdit'

Documentation doesn't give any restrictions on that signal.

What is the problem?

TIA!


回答1:


inputRejected() has been recently introduced in Qt 5.12 so you'll have to update your version of Qt.

  • [QTBUG-57448] Added inputRejected() signal for when a key press is not accepted by the QLineEdit. For instance, when an invalid key is pressed for a validator set.


来源:https://stackoverflow.com/questions/53671627/inputrejected-signal-not-found

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!