Include horizontal scrollbar in examples
This commit is contained in:
parent
caa722c399
commit
f092987678
|
@ -7,7 +7,8 @@
|
||||||
ScrollBarSettingsEditor::ScrollBarSettingsEditor(QWidget *parent)
|
ScrollBarSettingsEditor::ScrollBarSettingsEditor(QWidget *parent)
|
||||||
: QWidget(parent),
|
: QWidget(parent),
|
||||||
ui(new Ui::ScrollBarSettingsForm),
|
ui(new Ui::ScrollBarSettingsForm),
|
||||||
m_scrollbar(new QtMaterialScrollBar)
|
m_verticalScrollbar(new QtMaterialScrollBar),
|
||||||
|
m_horizontalScrollbar(new QtMaterialScrollBar)
|
||||||
{
|
{
|
||||||
QVBoxLayout *layout = new QVBoxLayout;
|
QVBoxLayout *layout = new QVBoxLayout;
|
||||||
setLayout(layout);
|
setLayout(layout);
|
||||||
|
@ -28,11 +29,17 @@ ScrollBarSettingsEditor::ScrollBarSettingsEditor(QWidget *parent)
|
||||||
|
|
||||||
QTextEdit *edit = new QTextEdit;
|
QTextEdit *edit = new QTextEdit;
|
||||||
edit->setText("<p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p>");
|
edit->setText("<p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p><p>The distinction between the subjects of syntax and semantics has its origin in the study of natural languages.</p>");
|
||||||
|
edit->setLineWrapMode(QTextEdit::NoWrap);
|
||||||
edit->update();
|
edit->update();
|
||||||
edit->setMaximumHeight(200);
|
edit->setMaximumHeight(200);
|
||||||
|
|
||||||
edit->setVerticalScrollBar(m_scrollbar);
|
edit->setVerticalScrollBar(m_verticalScrollbar);
|
||||||
m_scrollbar->setHideOnMouseOut(false);
|
edit->setHorizontalScrollBar(m_horizontalScrollbar);
|
||||||
|
|
||||||
|
m_verticalScrollbar->setHideOnMouseOut(false);
|
||||||
|
|
||||||
|
m_horizontalScrollbar->setHideOnMouseOut(false);
|
||||||
|
m_horizontalScrollbar->setOrientation(Qt::Horizontal);
|
||||||
|
|
||||||
layout->addWidget(edit);
|
layout->addWidget(edit);
|
||||||
layout->setAlignment(edit, Qt::AlignHCenter);
|
layout->setAlignment(edit, Qt::AlignHCenter);
|
||||||
|
|
|
@ -20,7 +20,8 @@ protected slots:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::ScrollBarSettingsForm *const ui;
|
Ui::ScrollBarSettingsForm *const ui;
|
||||||
QtMaterialScrollBar *const m_scrollbar;
|
QtMaterialScrollBar *const m_verticalScrollbar;
|
||||||
|
QtMaterialScrollBar *const m_horizontalScrollbar;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SCROLLBARSETTINGSEDITOR_H
|
#endif // SCROLLBARSETTINGSEDITOR_H
|
||||||
|
|
Loading…
Reference in New Issue