eric7/E5Gui/E5LineEdit.py

branch
eric7
changeset 8319
ea11a3948f40
parent 8318
962bce857696
child 8350
74a3b2a6a944
diff -r 962bce857696 -r ea11a3948f40 eric7/E5Gui/E5LineEdit.py
--- a/eric7/E5Gui/E5LineEdit.py	Sun May 16 20:07:24 2021 +0200
+++ b/eric7/E5Gui/E5LineEdit.py	Mon May 17 19:58:15 2021 +0200
@@ -15,8 +15,6 @@
     QSpacerItem, QSizePolicy
 )
 
-import UI.PixmapCache
-
 
 class E5LineEditSideWidget(QWidget):
     """
@@ -278,19 +276,4 @@
         """
         super().__init__(parent, inactiveText)
         
-        from E5Gui.E5LineEditButton import E5LineEditButton
-        self.__clearButton = E5LineEditButton(self)
-        self.__clearButton.setIcon(UI.PixmapCache.getIcon("clearLeft"))
-        self.addWidget(self.__clearButton, side)
-        self.__clearButton.setVisible(False)
-        
-        self.__clearButton.clicked.connect(self.clear)
-        self.textChanged.connect(self.__textChanged)
-    
-    def __textChanged(self, txt):
-        """
-        Private slot to handle changes of the text.
-        
-        @param txt text (string)
-        """
-        self.__clearButton.setVisible(txt != "")
+        self.setClearButtonEnabled(True)

eric ide

mercurial