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

QPlainTextEdit: long placeholder text doesn't auto-wrap

XMLWordPrintable

      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();
      }
      

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

            richard Richard Moe Gustavsen
            alexium Alex
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes