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

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

    XMLWordPrintable

Details

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

    Description

      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()
       

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes