Gui interface best library

Hi all, I’m starting to write code for gui application and online I found many libraries as pyqt, kivy, tkinter etc. I tried reading opinions on google but I’m confused. I’m interesting in create apps for windows and android a sometimes for ios too. I would like to write gui to manage a remote arduino, for management softwares, for math application and for auto pdf documents generating.

Can I ask you some suggestions for the better library?
many thanks

1 Like

The only Python GUI library I’m aware of that boasts Android and/or iOS support is Kivy. Qt supports iOS, and it may be able to combine that with Python, but I don’t think that’s actually supported and I don’t expect it’s easy.

Another alternative might be to write a web app (e.g. with flask) instead.

If there are ten different GUI libraries available, you will find a
hundred different opinions about which is best.

Decide on your minimum requirements, e.g. support for Windows, or
Android, or both, or something else. Find out which libraries support
those minimum requirements. E.g. I don’t think that tkinter supports
Android, so you can cross tkinter off your list.

Once you have a short list of libraries that support your minimum
requirement, choose one. Just pick one, install it, and do the
tutorial. Did you hate using it? Then choose another. Did you like it?
Then stick with that one.

Any recommendation I could make for “the better library”, a thousand
other people will insist I’m an idiot who picked the worst library. So
don’t stress about it. They are all free, either open source (like
tkinter) or available under a free community edition, so you can try
without it costing you any money. If you spend a day doing a tutorial,
that’s good experience.

Having said that, I’m going to suggest you check out PySimpleGUI, not
because I’ve tested it myself, but only because it claims to support
Android.

https://pysimplegui.readthedocs.io/en/latest/#hardware-and-os-support

Have fun!

Don’t worry, Steve, I’m not about to insist anything about you based on your recommendation. :wink:

It looks like it does actually support Android, but perhaps only in certain environments.

The place to go for more information about that would probably be the pyqtdeploy user guide:
https://www.riverbankcomputing.com/static/Docs/pyqtdeploy/

There’s a page on the Python Wiki with some suggestions for ways to run Python on Android:
https://wiki.python.org/moin/Android

It’s probably out of date, so it could use some attention from people with practical experience of building and deploying apps.

You might also be interested in: https://beeware.org/

Write your apps in Python and release them on iOS, Android, Windows, MacOS, Linux, Web, and tvOS using rich, native user interfaces. Multiple apps, one codebase, with a fully native user experience on every platform.

That’s the idea, but is it actually delivering on that promise? Development always seems to be converging towards the end goal, yet never quite getting there.

Yes, I see. I haven’t used it, but was aware of it and it seemed relevant. It does seem to still be quite active, though.

Yes, I think it manages to keep going with a core group of contributors, and there always seems to be a stream of new people looking to develop apps, mainly for mobile platforms. I was following the Discord chat for a while.

I don’t believe there’s a solution that supports both desktop/traditional and mobile apps to the level that will satisfy developers who want to produce apps that integrate well with all platforms. I could be wrong about this because I don’t follow development of all the available solutions.

My first suggestion would be to try and keep “backend” code separate from GUI code, then reuse the “backend” code with different GUI implementations for desktop and mobile.

My second suggestion would be to try out each of the GUI solutions and see which feels comfortable to develop with. Even if someone tries a couple of libraries and doesn’t like them, at least they will have hopefully learned something about what they want from a GUI framework.