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

QPlainTextEdit: long placeholder text doesn't auto-wrap

    XMLWordPrintable

Details

    Description

      When lineWrapMode is set to "WidgetWidth" in a QPlainTextEdit, normal long text wraps, but long placeholder does not.

      Demo:

      #include <QApplication>
      #include <QMainWindow>
      #include <QPlainTextEdit>
      
      int main(int argc, char *argv[])
      {
      	QApplication a(argc, argv);
      	QMainWindow w;
      
      	auto textEdit = new QPlainTextEdit(&w);
      	textEdit->setLineWrapMode(QPlainTextEdit::WidgetWidth);
      	textEdit->setPlaceholderText("abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc abc");
      
      	w.setCentralWidget(textEdit);
      	w.show();
      
      	return a.exec();
      }
      

      Attachments

        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
              alexium Alex
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes