focusChanged(bool) signal for LineEdit
(cherry picked from commit 5de5a43e00e2ff285492b5f7fb095f85c2cd9fd8)
This commit is contained in:
parent
2c9d3c0a0e
commit
98da6feb68
@ -189,6 +189,8 @@ void LineEdit::focusInEvent(QFocusEvent *event)
|
||||
// as of Qt 4.7, apparently we have a bug here in QGraphicsProxyWidget
|
||||
nativeWidget()->setFocus(event->reason());
|
||||
}
|
||||
|
||||
emit focusChanged(true);
|
||||
}
|
||||
|
||||
void LineEdit::focusOutEvent(QFocusEvent *event)
|
||||
@ -215,6 +217,8 @@ void LineEdit::focusOutEvent(QFocusEvent *event)
|
||||
}
|
||||
|
||||
QGraphicsProxyWidget::focusOutEvent(event);
|
||||
|
||||
emit focusChanged(false);
|
||||
}
|
||||
|
||||
} // namespace Plasma
|
||||
|
@ -133,6 +133,11 @@ Q_SIGNALS:
|
||||
* @since 4.4
|
||||
*/
|
||||
void textChanged(const QString &text);
|
||||
/**
|
||||
* Emitted when the widget receives or loses focus
|
||||
* @since 4.7
|
||||
*/
|
||||
void focusChanged(bool focused);
|
||||
|
||||
private:
|
||||
Q_PRIVATE_SLOT(d, void setPalette())
|
||||
|
Loading…
x
Reference in New Issue
Block a user