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

QFontDatabase is not registered in pyside2-uic

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.12.3
    • 5.11.0, 5.11.1, 5.11.2, 5.12.0, 5.12.1, 5.12.2
    • PySide
    • None
    • All
    • ae38dd485bab4a0591745b78afa28547ce6ae6fc (qt/qtbase/dev)

    Description

      The report is born as a result of the question: https://stackoverflow.com/questions/55510469 which points out that QFontDatabase is not supported by pyuic5, but by reviewing I observe that the same problem occurs in pyside2-uic.

      I have managed to solve it by adding QFontDatabase to class QtGui(ProxyNamespace in pyside2uic/Compiler/qtproxies.py:

      class QtGui(ProxyNamespace):
          class QIcon(ProxyClass): pass
          class QConicalGradient(ProxyClass): pass
          class QLinearGradient(ProxyClass): pass
          class QRadialGradient(ProxyClass): pass
          class QBrush(ProxyClass): pass
          class QPainter(ProxyClass): pass
          class QPalette(ProxyClass): pass
          class QFont(ProxyClass): pass
          class QFontDatabase(ProxyClass): pass # <--- this line   

      It would be great if in the next release they apply my solution.
       

      Attachments

        1. demo.ui
          1 kB
          Edwin Christian Yllanes Cucho
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            eyllanesc Edwin Christian Yllanes Cucho
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes