E5Gui/E5LineEdit.py

changeset 1131
7781e396c903
parent 945
8cd4d08fa9f6
child 1509
c0b5e693b0eb
equal deleted inserted replaced
1130:3e9f0330f833 1131:7781e396c903
22 """ 22 """
23 Constructor 23 Constructor
24 24
25 @param parent reference to the parent widget (QWidget) 25 @param parent reference to the parent widget (QWidget)
26 """ 26 """
27 QWidget.__init__(self, parent) 27 super().__init__(parent)
28 28
29 def event(self, evt): 29 def event(self, evt):
30 """ 30 """
31 Protected method to handle events. 31 Protected method to handle events.
32 32
50 Constructor 50 Constructor
51 51
52 @param parent reference to the parent widget (QWidget) 52 @param parent reference to the parent widget (QWidget)
53 @param inactiveText text to be shown on inactivity (string) 53 @param inactiveText text to be shown on inactivity (string)
54 """ 54 """
55 QLineEdit.__init__(self, parent) 55 super().__init__(parent)
56 56
57 self.setMinimumHeight(22) 57 self.setMinimumHeight(22)
58 58
59 self.__inactiveText = inactiveText 59 self.__inactiveText = inactiveText
60 60
104 Protected method to handle resize events. 104 Protected method to handle resize events.
105 105
106 @param evt reference to the resize event (QResizeEvent) 106 @param evt reference to the resize event (QResizeEvent)
107 """ 107 """
108 self.__updateSideWidgetLocations() 108 self.__updateSideWidgetLocations()
109 QLineEdit.resizeEvent(self, evt) 109 super().resizeEvent(evt)
110 110
111 def paintEvent(self, evt): 111 def paintEvent(self, evt):
112 """ 112 """
113 Protected method handling a paint event. 113 Protected method handling a paint event.
114 114
115 @param evt reference to the paint event (QPaintEvent) 115 @param evt reference to the paint event (QPaintEvent)
116 """ 116 """
117 QLineEdit.paintEvent(self, evt) 117 super().paintEvent(evt)
118 118
119 if not self.text() and \ 119 if not self.text() and \
120 self.__inactiveText and \ 120 self.__inactiveText and \
121 not self.hasFocus(): 121 not self.hasFocus():
122 panel = QStyleOptionFrameV2() 122 panel = QStyleOptionFrameV2()

eric ide

mercurial