eric7/Plugins/WizardPlugins/FontDialogWizard/FontDialogWizardDialog.py

branch
eric7
changeset 8318
962bce857696
parent 8312
800c432b34c8
child 8324
83084f088655
equal deleted inserted replaced
8316:0c7a44af84bc 8318:962bce857696
7 Module implementing the font dialog wizard dialog. 7 Module implementing the font dialog wizard dialog.
8 """ 8 """
9 9
10 import os 10 import os
11 11
12 from PyQt5.QtCore import pyqtSlot 12 from PyQt6.QtCore import pyqtSlot
13 from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QFontDialog 13 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QFontDialog
14 14
15 from .Ui_FontDialogWizardDialog import Ui_FontDialogWizardDialog 15 from .Ui_FontDialogWizardDialog import Ui_FontDialogWizardDialog
16 16
17 17
18 class FontDialogWizardDialog(QDialog, Ui_FontDialogWizardDialog): 18 class FontDialogWizardDialog(QDialog, Ui_FontDialogWizardDialog):
115 if self.eVariable.text() or self.font is not None: 115 if self.eVariable.text() or self.font is not None:
116 if title or parent != "None": 116 if title or parent != "None":
117 code += '{0}{1}'.format(os.linesep, istring) 117 code += '{0}{1}'.format(os.linesep, istring)
118 if not self.eVariable.text(): 118 if not self.eVariable.text():
119 if self.font is not None: 119 if self.font is not None:
120 code += 'QFont("{0}", {1:d}, {2:d}, {3:d})'.format( 120 code += 'QFont(["{0}"], {1:d}, {2:d}, {3:d})'.format(
121 self.font.family(), self.font.pointSize(), 121 self.font.family(), self.font.pointSize(),
122 self.font.weight(), self.font.italic()) 122 self.font.weight(), self.font.italic())
123 else: 123 else:
124 code += self.eVariable.text() 124 code += self.eVariable.text()
125 if title: 125 if title:

eric ide

mercurial