MCPcopy Create free account
hub / github.com/Liniyous/ElaWidgetTools / focusInEvent

Method focusInEvent

ElaWidgetTools/ElaLineEdit.cpp:62–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60{
61 Q_D(const ElaLineEdit);
62 return d->_pIsClearButtonEnable;
63}
64
65void ElaLineEdit::focusInEvent(QFocusEvent* event)
66{
67 Q_D(ElaLineEdit);
68 Q_EMIT focusIn(this->text());
69 if (event->reason() != Qt::PopupFocusReason)
70 {
71 if (d->_pIsClearButtonEnable)
72 {
73 setClearButtonEnabled(true);
74 }
75 }
76 QLineEdit::focusInEvent(event);
77 update();
78}
79
80void ElaLineEdit::focusOutEvent(QFocusEvent* event)
81{
82 Q_D(ElaLineEdit);
83 Q_EMIT focusOut(this->text());
84 if (event->reason() != Qt::PopupFocusReason)
85 {
86 if (d->_pIsClearButtonEnable)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected