aboutsummaryrefslogtreecommitdiff
path: root/src/aolineedit.cpp
blob: 1c141c3320905be313f45bb2a0deabd726107ee9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "aolineedit.h"

AOLineEdit::AOLineEdit(QWidget *parent) : QLineEdit(parent)
{
}

void AOLineEdit::mouseDoubleClickEvent(QMouseEvent *e)
{
  QLineEdit::mouseDoubleClickEvent(e);

  double_clicked();
}
void AOLineEdit::focusOutEvent(QFocusEvent *ev)
{
  int start = selectionStart();
  int len = selectionEnd() - start; //We're not using selectionLength because Linux build doesn't run qt5.10
  QLineEdit::focusOutEvent(ev);
  if (p_selection && start != -1 && len != -1)
    this->setSelection(start, len);
}