2

I'm trying to use a QPlainTextEdit but by default it go back at the next line when one is too long.

Is there anyway way to do a horizontal overflow (so to have a scrollbar instead and that the line continue 'endlessly') ?

Xwilarg
  • 364
  • 1
  • 6
  • 16

1 Answers1

4

QPlainTextEdit has the method setLineWrapMode(QPlainTextEdit::LineWrapMode mode) you can use to set this property.

setLineWrapMode(QPlainTextEdit::LineWrapMode mode)

Result widget

  • Through code:
#include <QPlainTextEdit>

QPlainTextEdit plainText;
plainText.setLineWrapMode(QPlainTextEdit::LineWrapMode::NoWrap);
  • Through Qt Designer:

Property picture

Stoogy
  • 1,307
  • 3
  • 16
  • 34
zancos
  • 58
  • 6