Preferences/ConfigurationPages/TemplatesPage.py

changeset 4676
c65b401b775e
parent 4674
41f716db325e
child 5389
9b1c800daff3
equal deleted inserted replaced
4675:adb8882de5af 4676:c65b401b775e
14 14
15 from .ConfigurationPageBase import ConfigurationPageBase 15 from .ConfigurationPageBase import ConfigurationPageBase
16 from .Ui_TemplatesPage import Ui_TemplatesPage 16 from .Ui_TemplatesPage import Ui_TemplatesPage
17 17
18 import Preferences 18 import Preferences
19
20 try:
21 MonospacedFontsOption = QFontDialog.MonospacedFonts
22 except AttributeError:
23 MonospacedFontsOption = QFontDialog.FontDialogOptions(0x10)
19 24
20 25
21 class TemplatesPage(ConfigurationPageBase, Ui_TemplatesPage): 26 class TemplatesPage(ConfigurationPageBase, Ui_TemplatesPage):
22 """ 27 """
23 Class implementing the Templates configuration page. 28 Class implementing the Templates configuration page.
67 """ 72 """
68 Private method used to select the font to be used by the code editor. 73 Private method used to select the font to be used by the code editor.
69 """ 74 """
70 self.editorFont = self.selectFont( 75 self.editorFont = self.selectFont(
71 self.editorFontSample, self.editorFont, 76 self.editorFontSample, self.editorFont,
72 options=QFontDialog.MonospacedFonts) 77 options=MonospacedFontsOption)
73 78
74 79
75 def create(dlg): 80 def create(dlg):
76 """ 81 """
77 Module function to create the configuration page. 82 Module function to create the configuration page.

eric ide

mercurial