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

        Issue Links

          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: