Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2303

Running height() or horizontalAdvance() on QFontMetrics kill Python.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 6.4.3
    • PySide
    • None
    • Python3.10.11, PySide6-6.4.3, PySide2-5.15.2.1
    • Windows

      sample code
      from PySide6.QtGui import QFont, QFontMetrics

      #from PySide2.QtGui import QFont, QFontMetrics
       
      font = QFont("times", 24)
      fm = QFontMetrics(font)
      pixelsWide = fm.horizontalAdvance("What's the advance width of self text?")
      pixelsHigh = fm.height()
       

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            crmaurei Cristian Maureira-Fredes
            yes89929 Eun-seop Ryu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes