33 self.__label = QLabel(self) |
33 self.__label = QLabel(self) |
34 self.__label.setWordWrap(True) |
34 self.__label.setWordWrap(True) |
35 |
35 |
36 self.__pathPicker = E5PathPicker(self) |
36 self.__pathPicker = E5PathPicker(self) |
37 self.__buttonBox = QDialogButtonBox( |
37 self.__buttonBox = QDialogButtonBox( |
38 QDialogButtonBox.Cancel | QDialogButtonBox.Ok, self) |
38 QDialogButtonBox.StandardButton.Cancel | |
|
39 QDialogButtonBox.StandardButton.Ok, self) |
39 |
40 |
40 self.__layout.addWidget(self.__label) |
41 self.__layout.addWidget(self.__label) |
41 self.__layout.addWidget(self.__pathPicker) |
42 self.__layout.addWidget(self.__pathPicker) |
42 self.__layout.addWidget(self.__buttonBox) |
43 self.__layout.addWidget(self.__buttonBox) |
43 |
44 |
148 dlg.setDefaultDirectory(defaultDirectory) |
149 dlg.setDefaultDirectory(defaultDirectory) |
149 if filters is not None and len(filters) > 0: |
150 if filters is not None and len(filters) > 0: |
150 dlg.setPickerFilters(";;".join(filters)) |
151 dlg.setPickerFilters(";;".join(filters)) |
151 |
152 |
152 # step 2: show the dialog and get the result |
153 # step 2: show the dialog and get the result |
153 if dlg.exec() == QDialog.Accepted: |
154 if dlg.exec() == QDialog.DialogCode.Accepted: |
154 ok = True |
155 ok = True |
155 path = dlg.getPath().strip() |
156 path = dlg.getPath().strip() |
156 else: |
157 else: |
157 ok = False |
158 ok = False |
158 path = "" |
159 path = "" |