Plasma.LineEdit

KDE 4.5 PyKDE API Reference

- KDE's Python API

# 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

editingFinished | ( |  | ) |

Signal syntax:
  `QObject.connect(source, SIGNAL("editingFinished()"), target_slot)`

returnPressed | ( |  | ) |

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

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
| ) |  |  |

KLineEdit nativeWidget | ( |  | self ) |

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:

  | message | the message

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

setText | ( | self, |
|  | QString | text
| ) |  |  |

Sets the display text for this LineEdit

@arg text the text to display; should be translated.

QString styleSheet | ( |  | self ) |

Returns:
  the stylesheet currently used with this widget

QString text | ( |  | self ) |

Returns:
  the display text