Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-79119

QLineEdit by default allows user input that contains multiple lines of text

    XMLWordPrintable

Details

    • Windows

    Description

      Would you consider it a bug if QLineEdit comes back with more than one line of text from the user, i.e. containing newlines ? The user is able to do this via Ctrl+V pasting the text which contains newlines.

      I believe that this should at minimum be documented somewhere on the QLineEdit reference page that users are by default allowed to paste newlines, so that developers will not be caught unawares.

      I'd also suggest a convenient way of globally disabling that behavior – i.e. not just via setting a disallowed set of chars but a boolean flag or better yet a global #define. IMHO it should be off by default.

       

      Note: I am marking this as a bug rather than a suggestion because it is both unexpected and undocumented. I tried searching the web on this or finding a reference to it in your documentation but couldn't find anything. So I assume it's not common knowledge.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            srutledg Shawn Rutledge
            sapient Patrick Parker
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes