diff options
| author | isanae <14251494+isanae@users.noreply.github.com> | 2019-06-23 03:03:41 -0400 |
|---|---|---|
| committer | isanae <14251494+isanae@users.noreply.github.com> | 2019-07-02 10:10:18 -0400 |
| commit | cbdc4cc3284f13477bfbf292d15c4a5742627091 (patch) | |
| tree | 7f50bb71db03fed7a57df70bc217a3ffd63d597a /src/texteditor.cpp | |
| parent | 8d1c121f648f2f6a8e0a5e2ad76cd245e318290d (diff) | |
split notes tab
added new HTMLEditor that triggers an editingFinished() on focus our, used by notes tab
Diffstat (limited to 'src/texteditor.cpp')
| -rw-r--r-- | src/texteditor.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/texteditor.cpp b/src/texteditor.cpp index 99490b22..6c1685da 100644 --- a/src/texteditor.cpp +++ b/src/texteditor.cpp @@ -458,3 +458,13 @@ void TextEditorToolbar::onWordWrap(bool b) { m_wordWrap->setChecked(b); } + + +void HTMLEditor::focusOutEvent(QFocusEvent* e) +{ + if (document() && document()->isModified()) { + emit editingFinished(); + } + + QTextEdit::focusInEvent(e); +} |
