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 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 the minimum width of the line edit, measured in number of characters. Use a number of characters the content of the editor is unknown, but a sample string can be used if the input pattern is known (such as a formatted date or a code) for greater accuracy.
Parameters: | width – the number of characters that should be visible in the editor or a string that should fit in the editor |
---|