[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Simple QFontMetrics example crashes Python!
From: David Boddie <david () boddie ! org ! uk>
Date: 2015-02-27 20:47:08
Message-ID: 201502272147.09315.david () boddie ! org ! uk
[Download RAW message or body]
On Fri, 27 Feb 2015 12:08:40 -0800, Nathan McCorkle wrote:
> Am I doing something wrong? I can't find info on whether I can do this
> without having a GUI running (I am working on a drawing application
> which is all terminal/non-GUI based).
>
> from PyQt5 import QtGui
> f = QtGui.QFont("times", 24)
> fm = QtGui.QFontMetrics(f)
> fm.width("whatup dawg???")
Does it still crash if you create a QApplication instance before trying to
read the metrics?
David
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic