The default QPlainTextEdit
has only vertical scroll bar, I want to add horizontal scroll bar.
I tried this (this code in the constructor of the QMainWindow
class)
QPlainTextEdit * editor = new QPlainTextEdit(this);
QScrollBar * hScroll = new QScrollBar(Qt::Horizontal);
editor->addScrollBarWidget(hScroll);
setCentralWidget(editor);
but the build failed with the error (invalid use of incomplete type 'class QScrollBar').