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

Method focusOutEvent

ElaWidgetTools/ElaLineEdit.cpp:85–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83 Q_EMIT focusOut(this->text());
84 if (event->reason() != Qt::PopupFocusReason)
85 {
86 if (d->_pIsClearButtonEnable)
87 {
88 setClearButtonEnabled(false);
89 }
90 Q_EMIT wmFocusOut(text());
91 }
92 QLineEdit::focusOutEvent(event);
93 update();
94}
95
96void ElaLineEdit::paintEvent(QPaintEvent* event)
97{
98 Q_D(ElaLineEdit);
99 if (palette().color(QPalette::Active, QPalette::Text) != ElaThemeColor(d->_themeMode, BasicText))
100 {
101 d->onThemeChanged(d->_themeMode);
102 }
103 QLineEdit::paintEvent(event);
104}
105
106void ElaLineEdit::contextMenuEvent(QContextMenuEvent* event)
107{
108 ElaMenu* menu = new ElaMenu(this);
109 menu->setMenuItemHeight(27);
110 menu->setAttribute(Qt::WA_DeleteOnClose);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected