hANSIc99/Pythonic

Clarifications requested!

Closed this issue · 4 comments

I have come across this repo while searching for python/qt use with webassembly. I would like to understand the architecture of the application.

  • you have qt running in webassembly, which I knew was possible by compiling c++ code with the wasm target
  • you have a bunch of PySide Qt classes which get invoked on startup
  • you have a bunch of C++ and associated files
  • do I understand that the UI is entirely in C++, but you have a python server process, or do you really have python in wasm calling qt in wasm entirely in the browser (with the rest of the python stuff just as helpers) ?

Since qt is the best desktop widget toolkit around, and web development is hard (UI frameworks being what htey are) for python programmers, you might be in a place to provide a cookie-cutter minimal app for others to be able to build python/qt apps in the browser.

Your assumptions are correct: The UI is plain C++ compiled to WASM, the backend is Python (PySide as I'm familiar with it and it provides the signal/slot mechanism).

Is it possible to compile pyqt to wasm?

I don't think so. You would need to compile the complete C/C++ source code (including all dependencies) to wasm.

I'll take from this: yes, it must be possible, just as qt/pyqt are compiled on other platforms, and indeed python itself exists on wasm. However, no one knows how or has tried.