Is there a way to set the font styles in Calibre regardless of the environment?
I tried with:
Code:
font = QFont()
font.setStyleHint(QFont.SansSerif)
font.setFamily('Arial') # Windows
#font.setFamily('Helvetica') # Linux
as described in the Qt documentation.
But I get the error message "'QFont' object has no attribute 'SansSerif'". The same applies to QFont.Serif, QFont.TypeWriter, etc.
I suspect this is because Calibre uses its own abstraction for Qt.