Compiling PyQt6
Phil Thompson
phil at riverbankcomputing.com
Thu Sep 14 22:06:30 BST 2023
On 14/09/2023 18:54, Stefan Seefeld wrote:
> OK, here is what I have:
>
> ```
> stefan at quasimodo$ ./bin/pip install PyQt6-Qt
> Collecting PyQt6-Qt
> Downloading PyQt6_Qt-6.0.1-py3-none-manylinux_2_28_x86_64.whl (46.5
> MB)
> ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.5/46.5 MB 3.0 MB/s eta
> 0:00:00
> Installing collected packages: PyQt6-Qt
> Successfully installed PyQt6-Qt-6.0.1
> stefan at quasimodo$ ./bin/bpython
> bpython version 0.24 on top of Python 3.11.4
> /home/stefan/tsi/tsi-dev-platform/pyqt6-tmp/bin/python3
>>>> from PyQt6 import Qt
>>>> dir(Qt)
> ['__doc__', '__file__', '__loader__', '__name__', '__package__',
> '__path__', '__spec__']
>>>>
> ```
That's an old version of PyQt. With current versions you will get the
same thing if you import Qt6. You are importing what Python thinks is a
namespace when it is actually the root of the Qt6 installation.
> Even so, if `PyQt6.Qt` no longer exists, is there a document explaining
> the
> migration path from PyQt5 to PyQt6, and especially about what those
> `Qt`
> symbols need to be replaced with ? All the online docs I found either
> don't
> talk about this, or state that the `Qt` module works almost as before.
The first step is the eliminate the use of the Qt module from your PyQt5
code. Replace it with the modules that are actually being used.
Phil
More information about the PyQt
mailing list