Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No text maximum size for mutilines "Text Edit" (QPlainText) form controls #20316

Closed
qgib opened this issue Feb 4, 2015 · 2 comments
Closed
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Forms

Comments

@qgib
Copy link
Contributor

qgib commented Feb 4, 2015

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

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0
  • regression was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Mar 9, 2019

Author Name: Giovanni Manghi (@gioman)


End of life notice: QGIS 2.18 LTR

Source:
http://blog.qgis.org/2019/03/09/end-of-life-notice-qgis-2-18-ltr/


  • resolution was changed from to end of life
  • status_id was changed from Open to Closed

@qgib qgib closed this as completed Mar 9, 2019
@qgib qgib added Bug Either a bug report, or a bug fix. Let's hope for the latter! Forms labels May 25, 2019
@qgib qgib added this to the Future Release - Lower Priority milestone May 25, 2019
Ailurupoda pushed a commit to SIRS-CLS/QGIS that referenced this issue Feb 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Forms
Projects
None yet
Development

No branches or pull requests

1 participant