94 self._editor = E5ClearableComboBox( |
94 self._editor = E5ClearableComboBox( |
95 self, QCoreApplication.translate( |
95 self, QCoreApplication.translate( |
96 "E5PathPickerBase", "Enter Path Name")) |
96 "E5PathPickerBase", "Enter Path Name")) |
97 |
97 |
98 self.__button = QToolButton(self) |
98 self.__button = QToolButton(self) |
99 self.__button.setToolButtonStyle(Qt.ToolButtonIconOnly) |
99 self.__button.setToolButtonStyle(Qt.ToolButtonStyle.ToolButtonIconOnly) |
100 self.__button.setIcon(UI.PixmapCache.getIcon("open")) |
100 self.__button.setIcon(UI.PixmapCache.getIcon("open")) |
101 |
101 |
102 self.__layout.addWidget(self._editor) |
102 self.__layout.addWidget(self._editor) |
103 self.__layout.addWidget(self.__button) |
103 self.__layout.addWidget(self.__button) |
104 |
104 |
108 self._editor.textChanged.connect(self.textChanged) |
108 self._editor.textChanged.connect(self.textChanged) |
109 else: |
109 else: |
110 self._editor.editTextChanged.connect(self.editTextChanged) |
110 self._editor.editTextChanged.connect(self.editTextChanged) |
111 |
111 |
112 self.setFocusProxy(self._editor) |
112 self.setFocusProxy(self._editor) |
113 self.setFocusPolicy(Qt.StrongFocus) |
113 self.setFocusPolicy(Qt.FocusPolicy.StrongFocus) |
114 self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Preferred) |
114 self.setSizePolicy(QSizePolicy.Policy.Expanding, |
|
115 QSizePolicy.Policy.Preferred) |
115 |
116 |
116 self.__button.setEnabled(self.__mode != E5PathPickerModes.NoMode) |
117 self.__button.setEnabled(self.__mode != E5PathPickerModes.NoMode) |
117 |
118 |
118 def __pathEdited(self, path): |
119 def __pathEdited(self, path): |
119 """ |
120 """ |