PyQt6 missing QRegExp

Phil Thompson phil at riverbankcomputing.com
Fri Nov 19 12:22:55 GMT 2021


On 19/11/2021 12:18, Kovid Goyal wrote:
> python -c "from PyQt6.QtCore import QRegExp"
>                               
> Traceback (most recent call last):
>   File "<string>", line 1, in <module>
> ImportError: cannot import name 'QRegExp' from 'PyQt6.QtCore'
> (/usr/lib/python3.9/site-packages/PyQt6/QtCore.abi3.so)
> 
> This is in the PyQt6 distributed by Arch Linux. But I doubt they do
> anything to prevent QRegExp from being built loading.

The Qt5 compatibility library isn't supported. Use QRegularExpression 
instead.

Phil


More information about the PyQt mailing list