[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pykde
Subject:    Re: Compiling PyQt6
From:       Phil Thompson <phil () riverbankcomputing ! com>
Date:       2023-09-14 21:06:30
Message-ID: fa11028d706005e9b6d0d2e9334e80d0 () riverbankcomputing ! com
[Download RAW message or body]

On 14/09/2023 18:54, Stefan Seefeld wrote:
> OK, here is what I have:
> 
> ```
> stefan@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@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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic