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 () |
| returnPressed () |
| textChanged (QString text) |
| textEdited (QString text) |
Methods |
| __init__ (self, QGraphicsWidget parent=0) |
| changeEvent (self, QEvent event) |
QString | clickMessage (self) |
| 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)
- Signal syntax:
QObject.connect(source, SIGNAL("returnPressed()"), target_slot)
Emitted when the text changes
- Since:
- 4.4
- Signal syntax:
QObject.connect(source, SIGNAL("textChanged(const QString&)"), target_slot)
- Signal syntax:
QObject.connect(source, SIGNAL("textEdited(const QString&)"), target_slot)
Method Documentation
changeEvent |
( |
self, |
|
|
|
QEvent |
event |
|
) |
|
|
|
- Returns:
- the text of a greyed out message that will go away when clicked
- Since:
- 4.5
bool isClearButtonShown |
( |
|
self ) |
|
- Returns:
- true if the clear button is set to be shown
- Since:
- 4.3
- Returns:
- the native widget wrapped by this LineEdit
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
@arg text 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
@arg stylesheet a CSS string
Sets the display text for this LineEdit
@arg text the text to display; should be translated.
- Returns:
- the stylesheet currently used with this widget
- Returns:
- the display text