diff options
| author | oldmud0 <oldmud0@users.noreply.github.com> | 2019-01-02 09:40:38 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-02 09:40:38 -0600 |
| commit | 4d93f059c01664ad074cf467e79a63b85e86beb0 (patch) | |
| tree | 57b8a9760796937e66e393b3bc00f4bee4337bdf /src/aotextedit.cpp | |
| parent | 6f1bce5882676ea7affe717a2f5a00b8c3b7fe12 (diff) | |
| parent | ec1057b5d7e1d39963275bc2cbd79a53cf6f3f5c (diff) | |
Merge pull request #54 from OmniTroid/master
Restructuring + better cross-platform support
Diffstat (limited to 'src/aotextedit.cpp')
| -rw-r--r-- | src/aotextedit.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/aotextedit.cpp b/src/aotextedit.cpp new file mode 100644 index 00000000..30e48b73 --- /dev/null +++ b/src/aotextedit.cpp @@ -0,0 +1,21 @@ +#include "aotextedit.h" + +AOTextEdit::AOTextEdit(QWidget *parent) : QPlainTextEdit(parent) +{ + this->setReadOnly(true); + + //connect(this, SIGNAL(returnPressed()), this, SLOT(on_enter_pressed())); +} + +void AOTextEdit::mouseDoubleClickEvent(QMouseEvent *e) +{ + QPlainTextEdit::mouseDoubleClickEvent(e); + + this->setReadOnly(false); +} + +void AOTextEdit::on_enter_pressed() +{ + this->setReadOnly(true); +} + |
