Changeset 11298:e4080ae13533 in orange


Ignore:
Timestamp:
02/01/13 20:16:40 (15 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Fixed an AtrributeError if QFont does not have 'Monospace' hint flag.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeCanvas/application/outputview.py

    r11270 r11298  
    2323 
    2424        font = self.font() 
    25         font.setStyleHint(QFont.Monospace) 
     25        if hasattr(QFont, "Monospace"): 
     26            # Why is this not available on Debian squeeze 
     27            font.setStyleHint(QFont.Monospace) 
     28        else: 
     29            font.setStyleHint(QFont.Courier) 
     30 
    2631        font.setFamily("Monaco") 
    2732        font.setPointSize(12) 
Note: See TracChangeset for help on using the changeset viewer.