[Python-modules-team] Bug#764761: closed by Dmitry Shachnev <mitya57 at gmail.com> (Re: pyqt4-dev-tools: fontMetrics.elidedText performs poorly on '\t' in QLabel.)

Enno enno.vet at gmx.net
Fri Oct 17 19:48:45 UTC 2014

Dear Dmitry,

Of course I know about the difference between tabs and spaces.

Segfault?  Well maybe I should add the full code:
from PyQt4.QtGui import QApplication, QLabel
a = QApplication([])
b = QLabel()
b.setGeometry(0, 0, 100, 24)
text = 'blah\tmooh\twoof'
fm = b.fontMetrics()
b.setText(fm.elidedText(text, 1, b.width()))

The width of the tab is 80px according to Qt documentation, but this is
not consistent with my experience, in my configuration in this QLabel it
seems to be about 56px wide.

Anyway I think it's an upstream problem, right from Qt, like so many :(.

Brgds, enno.

      //       enno.vet at gmx.net
    /\\\       Mag. Enno Deimel
  .\    o
 \\  \ _  \    Wisely and slow; they stumble that run fast.
\\\     \_/
gpg-fp: eefe b049 6fe6 fc0b 0ec4  f39e af6a c178 eb98 909a

More information about the Python-modules-team mailing list