PyQt on Android

2024/11/19 15:32:41

I'm working on PyQt now, and I have to create the application on Android, I've seen the kivy library, but it's too crude.

Is there any way now to run an application on Android made on PyQt?

Answer

With the tool pyqtdeploy you can deploy a PyQt5 app to:

  • Windows
  • GNU/Linux
  • Mac OS X
  • Android
  • iOS

Click here to see pyqtdeploy's documentation. It is a GUI tool that will package your PyQt5 application and compile it for the target platform.

pyqtdeploy gui

It lets you select various Qt modules to include in the compilation:

pyqtdeploy modules

On the command-line you would use the pyqtdeploy-build command like this:

pyqtdeploy-build pyqt-demo.pdy

Back in June 2016, there was a mailing list message that indicated that pyqtdeploy works. It's 2018 as I'm writing this so I assume pyqtdeploy has matured; the latest package version is 2.0.1 which was released on 5 January 2018.

https://en.xdnf.cn/q/26427.html

Related Q&A

How to elementwise-multiply a scipy.sparse matrix by a broadcasted dense 1d array?

Suppose I have a 2d sparse array. In my real usecase both the number of rows and columns are much bigger (say 20000 and 50000) hence it cannot fit in memory when a dense representation is used:>>…

Do I have to do StringIO.close()?

Some code:import cStringIOdef f():buffer = cStringIO.StringIO()buffer.write(something)return buffer.getvalue()The documentation says:StringIO.close(): Free the memory buffer. Attempting to do furtherop…

Python: ulimit and nice for subprocess.call / subprocess.Popen?

I need to limit the amount of time and cpu taken by external command line apps I spawn from a python process using subprocess.call , mainly because sometimes the spawned process gets stuck and pins the…

array.shape() giving error tuple not callable

I have a 2D numpy array called results, which contains its own array of data, and I want to go into it and use each list: for r in results:print "r:"print ry_pred = np.array(r)print y_pred.sh…

Python unittest - Ran 0 tests in 0.000s

So I want to do this code Kata for practice. I want to implement the kata with tdd in separate files:The algorithm:# stringcalculator.py def Add(string):return 1and the tests:# stringcalculator.spec.…

How and where does py.test find fixtures

Where and how does py.test look for fixtures? I have the same code in 2 files in the same folder. When I delete conftest.py, cmdopt cannot be found running test_conf.py (also in same fo…

Python match a string with regex [duplicate]

This question already has answers here:What exactly do "u" and "r" string prefixes do, and what are raw string literals?(7 answers)What exactly is a "raw string regex" an…

What are the consequences of disabling gossip, mingle and heartbeat for celery workers?

What are the implications of disabling gossip, mingle, and heartbeat on my celery workers?In order to reduce the number of messages sent to CloudAMQP to stay within the free plan, I decided to follow …

How to determine if an exception was raised once youre in the finally block?

Is it possible to tell if there was an exception once youre in the finally clause? Something like:try:funky code finally:if ???:print(the funky code raised)Im looking to make something like this m…

How to use re match objects in a list comprehension

I have a function to pick out lumps from a list of strings and return them as another list:def filterPick(lines,regex):result = []for l in lines:match = re.search(regex,l)if match:result += [match.grou…