QAxWidget not working on PyQt6

Lukas Lang lukaslang.bugtracker at outlook.com
Mon Oct 6 07:44:09 BST 2025


Hi,

I am running into an issue trying to use QAxWidget in PyQt6:

import sys
from PyQt6.QAxContainer import QAxWidget
from PyQt6.QtWidgets import QApplication, QMainWindow

class MyWindow(QMainWindow):
    def __init__(self):
        super().__init__()

        self.ax = QAxWidget("Shell.Explorer.2") # other ActiveX controls are also broken

if __name__ == "__main__":
    app = QApplication(sys.argv)
    window = MyWindow()
    window.show()
    sys.exit(app.exec())

Trying to run this in Python 3.13.7 with only PyQt6 installed, I get "Cannot mix incompatible Qt library (6.9.0) with this library (6.9.2)". Replacing PyQt6 in the imports with PyQt5 works as expected on the other hand (after installing PyQt5 of course). Am I doing something wrong, or is there a problem with the pre-built binaries?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20251006/2dfc2fb9/attachment.htm>


More information about the PyQt mailing list