pyuic5 bug with QFontComboBox
Baz Walter
bazwal at gmail.com
Wed Oct 6 20:52:15 BST 2021
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)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.py
Type: text/x-python
Size: 450 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20211006/f606d506/attachment.py>
More information about the PyQt
mailing list