blob: 18a4a7491190ab4fd702d877e51e446bb92a2592 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
//! [0]
font = QFont("times", 24)
fm = QFontMetrics(font)
pixelsWide = fm.width("What's the width of this text?")
pixelsHigh = fm.height()
//! [0]
//! [1]
font = QFont("times", 24)
fm = QFontMetricsF(font)
pixelsWide = fm.width("What's the width of this text?")
pixelsHigh = fm.height()
//! [1]
|