Plugins/WizardPlugins/FontDialogWizard/FontDialogWizardDialog.py

changeset 425
ca5e65413fc5
parent 96
9624a110667d
child 446
69aac6eeba9b
equal deleted inserted replaced
424:d0915392cbd7 425:ca5e65413fc5
90 """ 90 """
91 # generate the code 91 # generate the code
92 code = 'QFontDialog.getFont(' 92 code = 'QFontDialog.getFont('
93 if not self.eVariable.text(): 93 if not self.eVariable.text():
94 if self.font is not None: 94 if self.font is not None:
95 code += 'QFont("%s", %d, %d, %d)' % \ 95 code += 'QFont("{0}", {1:d}, {2:d}, {3:d})'.format(
96 (self.font.family(), self.font.pointSize(), 96 self.font.family(), self.font.pointSize(),
97 self.font.weight(), self.font.italic()) 97 self.font.weight(), self.font.italic())
98 else: 98 else:
99 code += self.eVariable.text() 99 code += self.eVariable.text()
100 code += ')%s' % os.linesep 100 code += '){0}'.format(os.linesep)
101 101
102 return code 102 return code

eric ide

mercurial