decorated_line_edit — Camelot documentation

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »
- controls »

# decorated_line_edit

class `camelot.view.controls.decorated_line_edit.` `DecoratedLineEdit`(parent=None)

  A QLineEdit with additional decorations :

  > - a background text, visible when the line edit doesn’t contain any text
  > - a validity, which will trigger the background color

  Use the user_input method to get the text that was entered by the user.

  Note : since QT 4.7 the background text could be replaced with the setPlaceholderText on a QLineEdit

  `set_background_text`(background_text)

    Set the text to be displayed in the background when the line input does not contain any text :param background_text: the text to be shown, None if no text should be shown

  `set_minimum_width`(width)

    Set the minimum width of the line edit, measured in number of characters. :param width: the number of characters that should be visible in the

    > editor

  `set_valid`(valid)

    Set the validity of the current content of the line edit :param valid: True or False

### Navigation

- index
- modules |
- next |
- previous |
- Camelot documentation »
- Camelot API »
- view »
- controls »

Comments
blog comments powered by Disqus