blob: 211d9f784faf690595096124ace11ad51425cb04 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#include "aolineedit.h"
AOLineEdit::AOLineEdit(QWidget *parent) : QLineEdit(parent)
{
this->setReadOnly(true);
this->setFrame(false);
connect(this, SIGNAL(returnPressed()), this, SLOT(on_enter_pressed()));
}
void AOLineEdit::mouseDoubleClickEvent(QMouseEvent *e)
{
QLineEdit::mouseDoubleClickEvent(e);
this->setReadOnly(false);
}
void AOLineEdit::on_enter_pressed() { this->setReadOnly(true); }
|