pyuic5 bug with QFontComboBox
Phil Thompson
phil at riverbankcomputing.com
Thu Oct 7 11:30:21 BST 2021
On 06/10/2021 20:52, Baz Walter wrote:
> When using PyQt-5.15.4, the ui compiler cannot handle QFontDatabase
> enums.
>
> The minimal test-case below raises the following exception:
>
> PyQt5.uic.exceptions.NoSuchClassError: Unknown C++ class:
> QFontDatabase
>
> Test-case:
>
> from io import StringIO
> from PyQt5 import uic, QtWidgets
>
> app = QtWidgets.QApplication(['test'])
>
> uic.loadUiType(StringIO("""\
> <?xml version="1.0" encoding="UTF-8"?>
> <ui version="4.0">
> <class>Form</class>
> <widget class="QWidget" name="Form">
> <widget class="QFontComboBox" name="fontComboBox">
> <property name="writingSystem">
> <enum>QFontDatabase::Latin</enum>
> </property>
> </widget>
> </widget>
> <resources/>
> <connections/>
> </ui>
> """))
>
> (NB: ui file was generated by Qt Designer 5.15.2)
Should be fixed in the next snapshot.
Thanks,
Phil
More information about the PyQt
mailing list