[Interest] Simple Starting PySide2 Questions
Cristian.Maureira-Fredes at qt.io
Tue May 21 17:12:04 CEST 2019
I'm answering inline:
On 5/21/19 3:25 PM, Jason H wrote:
> In preparing to use PySide2, I have several questions. Please feel free to direct me to proper resources, if I missed them.
> 1. According to https://wiki.qt.io/Qt_for_Python#Frequently_Asked_Questions ,
> - Embedded is not supported, with Raspberry Pi specifically called out. Why are these platforms (especially the Pi) "not supported"?
> - What does this"not supported" scenario look like (i.e. it doesn't
work at all on arm7, or is not guaranteed to work, etc?)
Because there is no "standard" solution to support embedded systems.
Python itself is struggling to be a first-class citizen on embedded
systems, so it's a problem of the language itself.
I know there are many ways to do so, but none of them is the official one:
Why Pi is mentioned?
- If you run any Linux on these systems, you can build PySide2 without
problems, but to distribute them among all the linux-based OS is not
standard because "wheels" are not properly supported, and there is a
project https://www.piwheels.org that is currently aiming to do that.
But again...that's just for Raspberry pi systems, so what's the option
for other platforms?
- We are currently trying to cross compile PySide2 for Linux-based
embedded OS, but is still on-going. (At least we would like to provide
a recipe to achieve this)
- Docker-base packaged: We have some members in the community playing
with this, but again it's on-going work.
- Provide a Yocto-based image so people can easily use Qt, and PySide2
on the supported devices by Qt (Hopefully I can work on this soon)
> 2. What is the best way to convert/use an image between QImage and what I get from Python's PIL imread()/numpy? (to avoid copy of 12M pix image) I am not sure how relevant https://stackoverflow.com/questions/13302908/better-way-of-going-from-pil-to-pyside-qimage is.
From the top of my head, I don't have a solution without copying it,
maybe you can try asking on the pyside mailing list:
(Also PIL is deprecated, please try to use pillow:
> 3. What integration is there (if any) between Qt's even loop and Python's existing asyncio event loops and await support?
> I found this: https://github.com/gmarull/asyncqt but all the indicators are fail.
> https://github.com/harvimt/quamash looks better, and allegedly works with Python 3.7
> I also found https://bugreports.qt.io/browse/PYSIDE-769, which seems to indicate that there is interest but no support yet.
> The bigger question here is: I will undoubtedly have to integrate with existing code that uses asyncio, so what's my best way to do that.
As you stated, those plugins are the only way of doing it,
and at the moment providing PEP3156 support is not a priority
mainly because we don't have enough resources to tackle that too.
> I'm sure I'll have more as I dig in, but that's what I have for now. Many thanks in advance.
Feel free to join the PySide mailing list,
I'm certain other devs will have advises for the questions you encounter.
Also the devs are quite active on the IRC channel #qt-pyside.
> Interest mailing list
> Interest at qt-project.org
Dr. Cristian Maureira-Fredes
The Qt Company GmbH
Rudower Chaussee 13
Geschäftsführer: Mika Pälsi,
Juha Varelius, Mika Harjuaho
Sitz der Gesellschaft: Berlin,
Charlottenburg, HRB 144331 B
More information about the Interest