decorated_line_edit

class camelot.view.controls.decorated_line_edit.DecoratedLineEdit(parent=None)[source]

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)[source]

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)[source]

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)[source]

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

Previous topic

dashboard

Next topic

delegates

This Page


Comments
blog comments powered by Disqus