[PyQt] Fonts on Macbook

David Arnold dwarnold45 at suddenlink.net
Sat Feb 13 20:17:14 GMT 2010


All,

I am trying a zetcode tutorial file:

import sys
from PyQt4 import QtGui
from PyQt4 import QtCore

class Tooltip(QtGui.QWidget):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        
        self.setGeometry(300, 300, 250, 150)
        self.setWindowTitle('Tooltip')
        
        self.setToolTip('This is a <b>QWidget</b> widget')
        QtGui.QToolTip.setFont(QtGui.QFont('Arial', 20))
        
        
app=QtGui.QApplication(sys.argv)
tp=Tooltip()
tp.show()
sys.exit(app.exec_())


No matter what changes I make to this line:

        QtGui.QToolTip.setFont(QtGui.QFont('Arial', 20))

The results are always the same. Are there any Mac users out there who can actually change fonts and fontsize in this script?

David




More information about the PyQt mailing list