Compiling PyQt6

Maurizio Berti maurizio.berti at gmail.com
Thu Sep 14 20:11:06 BST 2023


It's written in the page about differences between PyQt6 and PyQt5:
https://www.riverbankcomputing.com/static/Docs/PyQt6/pyqt5_differences.html

The Qt module was just an import "shortcut" for all standard Qt modules
which were imported all at once, so you just need to use proper submodule
namespaces: QtCore, QtWidgets, etc.

If you are able to import it, you probably have a "Qt" directory left
somewhere from your custom build.

Il giorno gio 14 set 2023 alle ore 19:55 Stefan Seefeld <stefan at seefeld.name>
ha scritto:

> 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__']
> >>>
> ```
> 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.
>
> Thanks,
>
> On Thu, Sep 14, 2023 at 1:35 PM Phil Thompson <phil at riverbankcomputing.com>
> wrote:
>
>> On 14/09/2023 18:16, Stefan Seefeld wrote:
>> > Thanks Phil for the quick reply !
>> >
>> > I'm a bit confused now. When I install both packages, I can do `from
>> > PyQt6
>> > import Qt`, so it definitely does seem to exist.
>>
>> >>> from PyQt6 import Qt
>> Traceback (most recent call last):
>>    File "<stdin>", line 1, in <module>
>> ImportError: cannot import name 'Qt' from 'PyQt6'
>>
>> (/Users/phil/bob/venv/develop-3.12/lib/python3.12/site-packages/PyQt6/__init__.py)
>>
>> Phil
>>
>
>
> --
>
>       ...ich hab' noch einen Koffer in Berlin...
>
>

-- 
È difficile avere una convinzione precisa quando si parla delle ragioni del
cuore. - "Sostiene Pereira", Antonio Tabucchi
http://www.jidesk.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20230914/06b034e2/attachment-0001.htm>


More information about the PyQt mailing list