LineEdit Class Reference
from PyKDE4.plasma import *
Inherits: QGraphicsProxyWidget → QGraphicsWidget → QObject
Namespace: Plasma
Detailed Description
LineEdit plasma/widgets/lineedit.h <Plasma/Widgets/LineEdit>
Provides a plasma-themed KLineEdit.
Signals |
| editingFinished () |
| focusChanged (bool focused) |
| returnPressed () |
| textChanged (QString text) |
| textEdited (QString text) |
Methods |
| __init__ (self, QGraphicsWidget parent=0) |
| changeEvent (self, QEvent event) |
QString | clickMessage (self) |
| focusInEvent (self, QFocusEvent event) |
| focusOutEvent (self, QFocusEvent event) |
| hoverEnterEvent (self, QGraphicsSceneHoverEvent event) |
| hoverLeaveEvent (self, QGraphicsSceneHoverEvent event) |
bool | isClearButtonShown (self) |
| mousePressEvent (self, QGraphicsSceneMouseEvent event) |
KLineEdit | nativeWidget (self) |
| paint (self, QPainter painter, QStyleOptionGraphicsItem option, QWidget widget) |
| setClearButtonShown (self, bool show) |
| setClickMessage (self, QString message) |
| setNativeWidget (self, KLineEdit nativeWidget) |
| setStyleSheet (self, QString stylesheet) |
| setText (self, QString text) |
QString | styleSheet (self) |
QString | text (self) |
Signal Documentation
- Signal syntax:
QObject.connect(source, SIGNAL("editingFinished()"), target_slot)
focusChanged |
( |
bool |
focused |
|
) |
|
|
|
Emitted when the widget receives or loses focus
- Since:
- 4.7
- Signal syntax:
QObject.connect(source, SIGNAL("focusChanged(bool)"), target_slot)
- Signal syntax:
QObject.connect(source, SIGNAL("returnPressed()"), target_slot)
textChanged |
( |
QString |
text |
|
) |
|
|
|
Emitted when the text changes
- Since:
- 4.4
- Signal syntax:
QObject.connect(source, SIGNAL("textChanged(const QString&)"), target_slot)
textEdited |
( |
QString |
text |
|
) |
|
|
|
- Signal syntax:
QObject.connect(source, SIGNAL("textEdited(const QString&)"), target_slot)
Method Documentation
__init__ |
( |
self, |
|
|
|
QGraphicsWidget |
parent=0 |
|
) |
|
|
|
changeEvent |
( |
self, |
|
|
|
QEvent |
event |
|
) |
|
|
|
QString clickMessage |
( |
|
self ) |
|
- Returns:
- the text of a greyed out message that will go away when clicked
- Since:
- 4.5
focusInEvent |
( |
self, |
|
|
|
QFocusEvent |
event |
|
) |
|
|
|
focusOutEvent |
( |
self, |
|
|
|
QFocusEvent |
event |
|
) |
|
|
|
hoverEnterEvent |
( |
self, |
|
|
|
QGraphicsSceneHoverEvent |
event |
|
) |
|
|
|
hoverLeaveEvent |
( |
self, |
|
|
|
QGraphicsSceneHoverEvent |
event |
|
) |
|
|
|
bool isClearButtonShown |
( |
|
self ) |
|
- Returns:
- true if the clear button is set to be shown
- Since:
- 4.3
mousePressEvent |
( |
self, |
|
|
|
QGraphicsSceneMouseEvent |
event |
|
) |
|
|
|
- Returns:
- the native widget wrapped by this LineEdit
paint |
( |
self, |
|
|
|
QPainter |
painter, |
|
|
QStyleOptionGraphicsItem |
option, |
|
|
QWidget |
widget |
|
) |
|
|
|
setClearButtonShown |
( |
self, |
|
|
|
bool |
show |
|
) |
|
|
|
Shows a button to clear the text
- Since:
- 4.3
setClickMessage |
( |
self, |
|
|
|
QString |
message |
|
) |
|
|
|
Sets a greyed out message that will go away after the user clicked the line edit
- Parameters:
-
- Since:
- 4.5
setNativeWidget |
( |
self, |
|
|
|
KLineEdit |
nativeWidget |
|
) |
|
|
|
Sets the line edit wrapped by this LineEdit (widget must inherit KLineEdit), ownership is transferred to the LineEdit
- Parameters:
-
| nativeWidget | line edit that will be wrapped by this LineEdit
|
- Since:
- KDE4.4
setStyleSheet |
( |
self, |
|
|
|
QString |
stylesheet |
|
) |
|
|
|
Sets the stylesheet used to control the visual display of this LineEdit
- Parameters:
-
setText |
( |
self, |
|
|
|
QString |
text |
|
) |
|
|
|
Sets the display text for this LineEdit
- Parameters:
-
| text | the text to display; should be translated.
|
QString styleSheet |
( |
|
self ) |
|
- Returns:
- the stylesheet currently used with this widget
- Returns:
- the display text