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

QPlainTextEdit multi-line placeholdertext is cut off

XMLWordPrintable

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

        1. Capture.PNG
          21 kB
          Kai Köhne
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes