Plugins/WizardPlugins/FontDialogWizard/FontDialogWizardDialog.py

changeset 3124
a01e410893ac
parent 2893
150de635fa29
child 3125
385a62b53725
diff -r 2c89ff79c246 -r a01e410893ac Plugins/WizardPlugins/FontDialogWizard/FontDialogWizardDialog.py
--- a/Plugins/WizardPlugins/FontDialogWizard/FontDialogWizardDialog.py	Sun Dec 01 17:29:45 2013 +0100
+++ b/Plugins/WizardPlugins/FontDialogWizard/FontDialogWizardDialog.py	Mon Dec 02 19:54:31 2013 +0100
@@ -92,7 +92,10 @@
         estring = os.linesep + indLevel * indString
         
         # generate the code
-        code = 'QFontDialog.getFont('
+        resvar = self.eResultVar.text()
+        if not resvar:
+            resvar = "font"
+        code = '{0}, ok = QFontDialog.getFont('.format(resvar)
         if not self.eVariable.text():
             if self.font is not None:
                 code += 'QFont("{0}", {1:d}, {2:d}, {3:d})'.format(

eric ide

mercurial