Hello, is there a way to set a regular expression on QTextEdit?
I'd like to set a maximum row number as row limit of text entred by the user.
Is it possible?
thx
Hello, is there a way to set a regular expression on QTextEdit?
I'd like to set a maximum row number as row limit of text entred by the user.
Is it possible?
thx
Last edited by mattia; 27th March 2008 at 08:35.
From QTextEdit docs:
If you want to limit the total number of paragraphs in a QTextEdit, as it is for example open useful in a log viewer, then you can use QTextDocument's maximumBlockCount property for that.
J-P Nurmi
mattia (27th March 2008)
but if i want to allow the user to entry just, for example, 50 characters...is there a way?
You can always override keyPressEvent() and call the base class implementation only if certain condition is fulfilled.
J-P Nurmi
Bookmarks