0

First, I have to admit I come back to this topic from time to time, and always I am very confused.

I'd like to use PyQt5 to test wether I could make a test application working on Android. This application should have a web view inside, and here comes the first doubt.

Since QWebKit was removed since version 5.6 of Qt, I thought I had to rely on Qt WebEngine, but sadly it is not compatible with mobile platforms.

So I decided to give up util only recently I discovered there's a new player called Qt WebView, which according to the official docs

is useful on mobile platforms such as Android, iOS, and WinRT

I found this SO answer which explains how to use it from a Qt/QML perspective, but I still have to find out how to do it from a PyQt perspective.

I do have a small testing application which uses Qt WebEngine and it works fine (also as regards to the JS interaction with QWebChannels) on desktop.

So after this premise and before diving into the (for me still) obscure world of pyqtdeploy, my questions are:

  1. Will Qt WebView work with PyQt AND Android?
  2. If so, should I replace Qt WebEngine with Qt WebView?
umbe1987
  • 2,894
  • 6
  • 35
  • 63
  • Closely related question: https://stackoverflow.com/questions/18436340/pyqt-on-android – MrEricSir Aug 09 '18 at 21:04
  • @MrEricSir That is not quite right, but thank you anyway for the feedback. basically, I know I can deploy a PyQt5 application to Android and I would use pyqtdeploy for that. However, I am asking about specifically if it is possible to create a WebView with PyQt5 which would be supported by mobile devices (Android in my case), and if the QML/QtWebView stuff is the way to go. – umbe1987 Aug 09 '18 at 21:25
  • Just to share that [this post](https://retifrav.github.io/blog/2018/07/14/html-from-qml-over-webchannel-websockets/) is highly related to what I need: communicating to the QML WebView through QWebChannell. Still, it's not PyQt5 based but [this other video](https://www.youtube.com/watch?v=QdetbaHhpNs&list=PLufFYdaWSynGrHS21HG5n9KtshR8YZoGr&index=1) shows how to build a QML app with PyQt5 so I guess it's a matter of studying both sources hopefully. Question number 1 is probably answered, will edit soon. – umbe1987 Aug 09 '18 at 21:33

0 Answers0