diff -r f4775ae8f441 -r 74a3b2a6a944 eric7/E5Gui/E5LineEdit.py --- a/eric7/E5Gui/E5LineEdit.py Fri May 21 18:01:11 2021 +0200 +++ b/eric7/E5Gui/E5LineEdit.py Fri May 21 20:14:48 2021 +0200 @@ -56,18 +56,20 @@ """ Class implementing a line edit widget showing some inactive text. """ - def __init__(self, parent=None, inactiveText=""): + def __init__(self, parent=None, placeholderText=""): """ Constructor - @param parent reference to the parent widget (QWidget) - @param inactiveText text to be shown on inactivity (string) + @param parent reference to the parent widget + @type QWidget + @param placeholderText text to be shown on inactivity + @type str """ super().__init__(parent) self.setMinimumHeight(22) - self.setPlaceholderText(inactiveText) + self.setPlaceholderText(placeholderText) self.__mainLayout = QHBoxLayout(self) self.__mainLayout.setContentsMargins(0, 0, 0, 0) @@ -239,41 +241,24 @@ if w == 0: return 0 return w + spacing * 2 - - def inactiveText(self): - """ - Public method to get the inactive text. - - @return inactive text (string) - """ - return self.placeholderText() - - def setInactiveText(self, inactiveText): - """ - Public method to set the inactive text. - - @param inactiveText text to be shown on inactivity (string) - """ - self.setPlaceholderText(inactiveText) - class E5ClearableLineEdit(E5LineEdit): """ Class implementing a line edit widget showing some inactive text and a clear button, if it has some contents. """ - def __init__(self, parent=None, inactiveText="", + def __init__(self, parent=None, placeholderText="", side=E5LineEditSide.RIGHT): """ Constructor @param parent reference to the parent widget @type QWidget - @param inactiveText text to be shown on inactivity + @param placeholderText text to be shown on inactivity @type str @param side side the clear button should be shown at @type E5LineEditSide """ - super().__init__(parent, inactiveText) + super().__init__(parent, placeholderText) self.setClearButtonEnabled(True)