Search code examples
c++qtqt5qlineeditqt-signals

inputRejected signal not found


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!


Solution

  • 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.