268 if self.cDirOnly.isChecked(): |
268 if self.cDirOnly.isChecked(): |
269 options |= QFileDialog.Option.ShowDirsOnly |
269 options |= QFileDialog.Option.ShowDirsOnly |
270 else: |
270 else: |
271 options |= QFileDialog.Option(0) |
271 options |= QFileDialog.Option(0) |
272 options = self.__adjustOptions(options) |
272 options = self.__adjustOptions(options) |
273 try: |
273 QFileDialog.getExistingDirectoryUrl( |
274 QFileDialog.getExistingDirectoryUrl( |
274 None, |
275 None, |
275 self.eCaption.text(), |
276 self.eCaption.text(), |
276 QUrl(self.eWorkDir.text()), |
277 QUrl(self.eWorkDir.text()), |
277 options, |
278 options, |
278 self.schemesEdit.text().split()) |
279 self.schemesEdit.text().split()) |
|
280 except TypeError: |
|
281 # PyQt5 < 5.13.0 contains an error |
|
282 QFileDialog.getExistingDirectoryUrl( |
|
283 None, |
|
284 self.eCaption.text(), |
|
285 self.eWorkDir.text(), |
|
286 options, |
|
287 self.schemesEdit.text().split()) |
|
288 |
279 |
289 def __toggleConfirmCheckBox(self): |
280 def __toggleConfirmCheckBox(self): |
290 """ |
281 """ |
291 Private slot to enable/disable the confirmation check box. |
282 Private slot to enable/disable the confirmation check box. |
292 """ |
283 """ |
330 |
321 |
331 self.urlPropertiesGroup.setEnabled(checkedId in (21, 22, 23, 31)) |
322 self.urlPropertiesGroup.setEnabled(checkedId in (21, 22, 23, 31)) |
332 |
323 |
333 def getCode(self, indLevel, indString): |
324 def getCode(self, indLevel, indString): |
334 """ |
325 """ |
335 Public method to get the source code for Qt5. |
326 Public method to get the source code for Qt6. |
336 |
327 |
337 @param indLevel indentation level (int) |
328 @param indLevel indentation level (int) |
338 @param indString string used for indentation (space or tab) (string) |
329 @param indString string used for indentation (space or tab) (string) |
339 @return generated code (string) |
330 @return generated code (string) |
340 """ |
331 """ |