Preferences/ConfigurationPages/EditorStylesPage.py

changeset 4676
c65b401b775e
parent 4674
41f716db325e
child 5389
9b1c800daff3
diff -r adb8882de5af -r c65b401b775e Preferences/ConfigurationPages/EditorStylesPage.py
--- a/Preferences/ConfigurationPages/EditorStylesPage.py	Sun Jan 17 13:05:52 2016 +0100
+++ b/Preferences/ConfigurationPages/EditorStylesPage.py	Sun Jan 17 13:40:24 2016 +0100
@@ -19,6 +19,11 @@
 
 import Preferences
 
+try:
+    MonospacedFontsOption = QFontDialog.MonospacedFonts
+except AttributeError:
+    MonospacedFontsOption = QFontDialog.FontDialogOptions(0x10)
+
 
 class EditorStylesPage(ConfigurationPageBase, Ui_EditorStylesPage):
     """
@@ -348,7 +353,7 @@
         """
         self.marginsFont = self.selectFont(
             self.marginsFontSample, self.marginsFont,
-            options=QFontDialog.MonospacedFonts)
+            options=MonospacedFontsOption)
         
     @pyqtSlot()
     def on_defaultFontButton_clicked(self):
@@ -366,7 +371,7 @@
         """
         self.monospacedFont = self.selectFont(
             self.monospacedFontSample, self.monospacedFont,
-            options=QFontDialog.MonospacedFonts)
+            options=MonospacedFontsOption)
         
     def polishPage(self):
         """

eric ide

mercurial