You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if you use a "Text Edit" Edit Widget on a field in QGis form, the text maximum length is limited to the maximum length of the field (once at the max size, you cannot type anything more).
If you check the multiline option for this field, there is no max length for the form control: you can type as much as you want, there is no limitation on the amount of characters.
If you store your data into an RDBMS and your data is too long, database will report an error and the feature will not be saved because you are exceeding the field size.
I've made tests under Oracle but I think that the situation is the same for the other RDBMS. This bug is reproducible with auto-generated, drag'n drop and custom forms.
In order to avoid database errors and to have a common behaviour for "Text Edit" widgets, QGis should also limit the text size for multine "Text Edit" form controls.
Author Name: Médéric RIBREUX (Médéric RIBREUX)
Original Redmine Issue: 12122
Affected QGIS version: 2.6.1
Redmine category:forms
Hello,
if you use a "Text Edit" Edit Widget on a field in QGis form, the text maximum length is limited to the maximum length of the field (once at the max size, you cannot type anything more).
If you check the multiline option for this field, there is no max length for the form control: you can type as much as you want, there is no limitation on the amount of characters.
If you store your data into an RDBMS and your data is too long, database will report an error and the feature will not be saved because you are exceeding the field size.
I've made tests under Oracle but I think that the situation is the same for the other RDBMS. This bug is reproducible with auto-generated, drag'n drop and custom forms.
In order to avoid database errors and to have a common behaviour for "Text Edit" widgets, QGis should also limit the text size for multine "Text Edit" form controls.
When checking multiline option, QPlainText is used in the form instead of QLineEdit. QLineEdit have a maxLength property so it is easy to fix the maximum size of a character string for these form controls. But you don't have the same property on QPlainText. But you can implement a maxLength property with a little bit of code ("Python":https://stackoverflow.com/questions/8479391/pyqt4-qtextedit-how-to-setmaxlength / "C++":http://www.qtcentre.org/threads/6776-Text-edit-and-maxLength?p=81544#post81544).
Thanks for fixing this...
The text was updated successfully, but these errors were encountered: