Switch of wordwrap in CodeEditor and SqlCodePreview
This commit is contained in:
parent
eefcb8fd51
commit
b8cfb223be
2 changed files with 3 additions and 0 deletions
|
|
@ -19,6 +19,8 @@ CodeEditor::CodeEditor(QWidget *parent)
|
||||||
connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlightCurrentLine()));
|
connect(this, SIGNAL(cursorPositionChanged()), this, SLOT(highlightCurrentLine()));
|
||||||
connect(this, SIGNAL(textChanged()), this, SLOT(onTextChanged()));
|
connect(this, SIGNAL(textChanged()), this, SLOT(onTextChanged()));
|
||||||
|
|
||||||
|
setWordWrapMode(QTextOption::NoWrap);
|
||||||
|
|
||||||
updateGutterAreaWidth(0);
|
updateGutterAreaWidth(0);
|
||||||
highlightCurrentLine();
|
highlightCurrentLine();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ SqlCodePreview::SqlCodePreview(QWidget *parent)
|
||||||
auto&& config = UserConfiguration::instance();
|
auto&& config = UserConfiguration::instance();
|
||||||
setFont(config->codeFont());
|
setFont(config->codeFont());
|
||||||
setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
|
setTextInteractionFlags(Qt::TextSelectableByMouse | Qt::TextSelectableByKeyboard);
|
||||||
|
setWordWrapMode(QTextOption::NoWrap);
|
||||||
m_highlighter = new SqlSyntaxHighlighter(document());
|
m_highlighter = new SqlSyntaxHighlighter(document());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue