139 @param variant variant of code to be generated |
139 @param variant variant of code to be generated |
140 (-1 = EricFileDialog, 0 = unknown, 5 = PyQt5, 6 = PyQt6) |
140 (-1 = EricFileDialog, 0 = unknown, 5 = PyQt5, 6 = PyQt6) |
141 @type int |
141 @type int |
142 @return the generated code (string) |
142 @return the generated code (string) |
143 """ |
143 """ |
144 from eric7.Plugins.WizardPlugins.FileDialogWizard.FileDialogWizardDialog import ( # __IGNORE_WARNING__ |
144 from eric7.Plugins.WizardPlugins.FileDialogWizard import FileDialogWizardDialog |
145 FileDialogWizardDialog, |
145 |
146 ) |
146 dlg = FileDialogWizardDialog.FileDialogWizardDialog(variant, None) |
147 |
|
148 dlg = FileDialogWizardDialog(variant, None) |
|
149 if dlg.exec() == QDialog.DialogCode.Accepted: |
147 if dlg.exec() == QDialog.DialogCode.Accepted: |
150 line, index = editor.getCursorPosition() |
148 line, index = editor.getCursorPosition() |
151 indLevel = editor.indentation(line) // editor.indentationWidth() |
149 indLevel = editor.indentation(line) // editor.indentationWidth() |
152 if editor.indentationsUseTabs(): |
150 if editor.indentationsUseTabs(): |
153 indString = "\t" |
151 indString = "\t" |