A few issue with 6.2.0

Damien Elmes pyqt at ankiweb.net
Thu Oct 21 04:39:02 BST 2021

Thanks for your continued work on PyQt, Phil. The improvements to the PyPI
packaging over the last few years are particularly appreciated - everything
is a lot easier than it used to be.

Just wanted to let you know about a few issues I came across:

- The Wayland driver appears to be missing
libQt6WaylandEglClientHwIntegration.so.6. When starting a PyQt app with

Cannot load library
(libQt6WaylandEglClientHwIntegration.so.6: cannot open shared object file:
No such file or directory)"
Qt warning: Failed to load client buffer integration: "wayland-egl"
Qt warning: Available client buffer integrations: QList("wayland-egl",
"xcomposite-egl", "xcomposite-glx")

Things work correctly when it's copied from a Qt6 install into

- QtWebEngineProcess appears to have a malformed signature in the macOS
builds, and needs to be re-signed before WebEngine will work on a Mac:

codesign -s  - \

- the macos_amd64 wheels should probably use 11_0 - they are currently
10_14, and pip refuses to install them with 'no matching distributions' on
an Apple M1 machine.

- The uic tool is outputting a few old-style enums that don't work, and
need to be adjusted:

line = line.replace(
    "QAction.PreferencesRole", "QAction.MenuRole.PreferencesRole"
line = line.replace("QAction.AboutRole", "QAction.MenuRole.AboutRole")
line = line.replace(

This is for content like the following in an action:

118-   <property name="menuRole">
119:    <enum>QAction::PreferencesRole</enum>
120-   </property>

and for qcombobox:

60-      <widget class="QComboBox" name="field">
61-       <property name="sizeAdjustPolicy">
62:        <enum>QComboBox::AdjustToMinimumContentsLengthWithIcon</enum>
63-       </property>
64-      </widget>

Also one issue not specific to the 6.2.0 release - the provided typings are
a big help, and coming from a 5.x release, it's nice to see py.typed being
included by default. One issue that still seems to remain though is that
mypy does not pick up references to missing attributes/methods on objects
inheriting from PyQt. This means if you make a class that inherits from
QDialog for example, and then call
self.a_custom_func_that_was_removed_in_a_refactor(), mypy can't warn you
about it. We're currently applying some transformations to the distributed
.pyi files to work around it:

# inheriting from the missing sip.sipwrapper definition
# causes missing attributes not to be detected, as it's treating
# the class as inheriting from Any
line = line.replace("PyQt6.sip.wrapper", "object")
# remove blanket getattr in QObject which also causes missing
# attributes not to be detected
if "def __getattr__(self, name: str) -> typing.Any" in line:

We also automatically add '# type: ignore' comments to any '.connect(' line
in generated uic files, as the types don't currently cover the signals.
Apart from that, the typing is working great.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20211021/9af1586b/attachment.htm>

More information about the PyQt mailing list