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

QPlainTextEdit multi-line placeholdertext is cut off

    XMLWordPrintable

Details

    Description

      QPlainTextEdit::setPlaceholderText seems to only work with one line strings ... multi-line placeholder text is not rendered properly.

      How to reproduce

      Run following application:

      #include <QApplication>
      #include <QPlainTextEdit>
      
      int main(int argc, char *argv[])
      {
          QApplication a(argc, argv);
      
          QPlainTextEdit editor;
          editor.setPlaceholderText("Hello\nWorld\n!");
          editor.show();
          return a.exec();
      }
      

      At least for Windows and Linux, only 'Hello' will be rendered properly (see screenshot).

      Attachments

        1. Capture.PNG
          21 kB
          Kai Köhne

        Issue Links

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

          Activity

            People

              richard Richard Moe Gustavsen
              kkohne Kai Köhne
              Votes:
              4 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes