251 |
251 |
252 @param parent reference to the parent widget (QWidget) |
252 @param parent reference to the parent widget (QWidget) |
253 @keyparam inactiveText text to be shown on inactivity (string) |
253 @keyparam inactiveText text to be shown on inactivity (string) |
254 @keyparam side side the clear button should be shown at |
254 @keyparam side side the clear button should be shown at |
255 (E5LineEdit.RightSide, E5LineEdit.LeftSide) |
255 (E5LineEdit.RightSide, E5LineEdit.LeftSide) |
256 """ |
256 @exception ValueError raised to indicate a bad parameter value |
257 assert side in [E5LineEdit.RightSide, E5LineEdit.LeftSide] |
257 """ |
|
258 if side not in [E5LineEdit.RightSide, E5LineEdit.LeftSide]: |
|
259 raise ValueError("Bad value for 'side' parameter.") |
258 |
260 |
259 super(E5ClearableLineEdit, self).__init__(parent, inactiveText) |
261 super(E5ClearableLineEdit, self).__init__(parent, inactiveText) |
260 |
262 |
261 from E5Gui.E5LineEditButton import E5LineEditButton |
263 from E5Gui.E5LineEditButton import E5LineEditButton |
262 self.__clearButton = E5LineEditButton(self) |
264 self.__clearButton = E5LineEditButton(self) |