
{ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 4, TabWidth: 4, BreakBeforeBraces: Stroustrup, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0, AccessModifierOffset: -4, NamespaceIndentation: All } (this is the Visual Studio preset with only "BreakBeforeBraces" changed from Allman to Stroustrup)
21 lines
533 B
C++
21 lines
533 B
C++
#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);
|
|
}
|