Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
QTextEdit and setValidator
WhatIf last edited by
I want a QTextEdit to prevent certain characters form being entered by the user. I tried what I did with a few QLineEdits but QTextEdit dosen't have setValidator()
ui->NotesTEdit->setValidator(new QRegExpValidator(rx, ui->NotesTEdit));
error: 'class QTextEdit' has no member named 'setValidator'
how can I get the intended behavior?
That's something you'll have to implement by hand. Likely using the textChanged.
Hope it helps