问题
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