E5Gui/E5ComboBox.py

changeset 2401
4f428de32b69
parent 2302
f29e9405c851
child 2525
8b507a9a2d40
child 2953
703452a2876f
equal deleted inserted replaced
2400:c1726b754f96 2401:4f428de32b69
6 """ 6 """
7 Module implementing combobox classes using the eric5 line edits. 7 Module implementing combobox classes using the eric5 line edits.
8 """ 8 """
9 9
10 from PyQt4.QtGui import QComboBox 10 from PyQt4.QtGui import QComboBox
11
12 from .E5LineEdit import E5LineEdit, E5ClearableLineEdit
13 11
14 12
15 class E5ComboBox(QComboBox): 13 class E5ComboBox(QComboBox):
16 """ 14 """
17 Class implementing a combobox using the eric5 line edit. 15 Class implementing a combobox using the eric5 line edit.
25 """ 23 """
26 super().__init__(parent) 24 super().__init__(parent)
27 25
28 self.setMinimumHeight(24) 26 self.setMinimumHeight(24)
29 27
28 from .E5LineEdit import E5LineEdit
30 self.__lineedit = E5LineEdit(self, inactiveText) 29 self.__lineedit = E5LineEdit(self, inactiveText)
31 self.setLineEdit(self.__lineedit) 30 self.setLineEdit(self.__lineedit)
32 31
33 self.setMinimumHeight(self.__lineedit.minimumHeight() + 3) 32 self.setMinimumHeight(self.__lineedit.minimumHeight() + 3)
34 33
60 @param parent reference to the parent widget (QWidget) 59 @param parent reference to the parent widget (QWidget)
61 @param inactiveText text to be shown on inactivity (string) 60 @param inactiveText text to be shown on inactivity (string)
62 """ 61 """
63 super().__init__(parent, inactiveText) 62 super().__init__(parent, inactiveText)
64 63
64 from .E5LineEdit import E5ClearableLineEdit
65 self.__lineedit = E5ClearableLineEdit(self, inactiveText) 65 self.__lineedit = E5ClearableLineEdit(self, inactiveText)
66 self.setLineEdit(self.__lineedit) 66 self.setLineEdit(self.__lineedit)

eric ide

mercurial