codeapp icon indicating copy to clipboard operation
codeapp copied to clipboard

PySide6 and QT

Open sylvoie opened this issue 2 years ago • 5 comments

Hello,

I tried to port a small project with QT. IS installed PySide6 successfully with pip. My project works fine on macOS, on iPad with CodeApp, I get this error :

PySide6/init.py: Unable to import Shiboken from /private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Dev/Python_projets/QT_project1, /private/var/containers/Bundle/Application/9D066F1E-1810-4513-99CB-0E595E9DA16E/Code.app/Library/lib/python39.zip, /private/var/containers/Bundle/Application/9D066F1E-1810-4513-99CB-0E595E9DA16E/Code.app/Library/lib/python3.9, /private/var/containers/Bundle/Application/9D066F1E-1810-4513-99CB-0E595E9DA16E/Code.app/Library/lib/python3.9/lib-dynload, /var/mobile/Containers/Data/Application/0C8BD758-66B6-4F21-9FB9-2D09FDD999EB/Library/lib/python3.9/site-packages, /private/var/containers/Bundle/Application/9D066F1E-1810-4513-99CB-0E595E9DA16E/Code.app/Library/lib/python3.9/site-packages, /private/var/containers/Bundle/Application/9D066F1E-1810-4513-99CB-0E595E9DA16E/Code.app/Library/lib/python3.9/site-packages/mpmath-1.2.2.dev18+g1bb25a4-py3.9.egg Traceback (most recent call last): File "/private/var/mobile/Library/Mobile Documents/com~apple~CloudDocs/Dev/Python_projets/QT_project1/multi-layout.py", line 2, in from PySide6.QtWidgets import QApplication, QWidget, QGridLayout, QStackedLayout, QHBoxLayout, QVBoxLayout, QPushButton, QLineEdit, QLabel, QListWidget File "/var/mobile/Containers/Data/Application/0C8BD758-66B6-4F21-9FB9-2D09FDD999EB/Library/lib/python3.9/site-packages/PySide6/init.py", line 111, in _setupQtDirectories() File "/var/mobile/Containers/Data/Application/0C8BD758-66B6-4F21-9FB9-2D09FDD999EB/Library/lib/python3.9/site-packages/PySide6/init.py", line 60, in _setupQtDirectories from shiboken6 import Shiboken File "/var/mobile/Containers/Data/Application/0C8BD758-66B6-4F21-9FB9-2D09FDD999EB/Library/lib/python3.9/site-packages/shiboken6/init.py", line 25, in from shiboken6.Shiboken import * ImportError: dlopen(/private/var/containers/Bundle/Application/9D066F1E-1810-4513-99CB-0E595E9DA16E/Code.app/Frameworks/python3_ios-shiboken6.Shiboken.framework/python3_ios-shiboken6.Shiboken, 0x0002): tried: '/private/var/containers/Bundle/Application/9D066F1E-1810-4513-99CB-0E595E9DA16E/Code.app/Frameworks/python3_ios-shiboken6.Shiboken.framework/python3_ios-shiboken6.Shiboken' (no such file), '/System/Library/Frameworks/python3_ios-shiboken6.Shiboken.framework/python3_ios-shiboken6.Shiboken' (no such file)

Pip list … PySide6 6.2.4 python-dateutil 2.8.1 pytz 2021.1 pyzmq 22.0.3 qtconsole 5.0.3 QtPy 1.9.0 semantic-version 2.8.5 Send2Trash 1.5.0 setuptools 56.0.0 setuptools-rust 0.12.1 shiboken6 6.2.4 …

I need help

Thank’s

sylvoie avatar Apr 04 '22 01:04 sylvoie

It seems like Shiboken requires a native component. The only way to support this is to bundle it in the app.

bummoblizard avatar Apr 04 '22 18:04 bummoblizard

Hello,

Thank you for your answer, is-it possible to package it in the app? I will test!

Thank’s

sylvoie avatar Apr 05 '22 00:04 sylvoie

Hello,

Thank you for your answer, is-it possible to package it in the app? I will test!

Thank’s

I will try to do that.

bummoblizard avatar Apr 05 '22 08:04 bummoblizard

I realised QT is a GUI library. It's likely impossible to port it to iOS without heavy modification because of its reliance on desktop gui interface.

bummoblizard avatar Apr 05 '22 08:04 bummoblizard

Hello,

I understand, no problem, I will work on macOS!

Thank you

sylvoie avatar Apr 05 '22 11:04 sylvoie