aboutsummaryrefslogtreecommitdiff
path: root/aotextedit.cpp
blob: 30e48b73317fc0fa35043de95597ffb8d69a62d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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);
}