Maximum input length for QTextEdit or QPlainTextEdit ??
Hello....
Does anyone knows how to set up the maximun number of characters a QTextEdit can hold ?
I mean, besides of installing a key eventFilter to count all the key pressed .....
I wanna have an text input area for users but limit the length, including CR/LF, to 500 characters...
Or if my direction is wrong... Please tell me.. this is going to drive me nuts... :crying:
Re: Maximum input length for QTextEdit or QPlainTextEdit ??
there is QTextDocument::setMaximumBlockCount(), I am not aware of a character-limit;
QLineEdit has one - but probably you want more than 1 line
Re: Maximum input length for QTextEdit or QPlainTextEdit ??
Quote:
Originally Posted by
caduel
there is QTextDocument::setMaximumBlockCount(), I am not aware of a character-limit;
QLineEdit has one - but probably you want more than 1 line
Thanks caduel....
But actually the concept of "Block" is not going to help here .. I already tried....
The Block in QT means a "phrase" or a consecutive of character.
So the effect MaximumBlockCount is not what I want.....