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() |