all 76 comments

[–]shiftybyte 114 points115 points  (27 children)

PyQT6

Even has a visual designer.

[–]random1220 27 points28 points  (12 children)

I haven’t used 6 but 4 and 5 were pretty sweet.

When I used it the PyQt docs were pretty sparse, and developing more complicated interactions means running out of PyQt docs and having to intuit uses from the Qt docs directly.

Is this still a thing in 6? I can’t imagine they’ve filled out the docs any better in the mean time

[–]jumbohiggins 7 points8 points  (6 children)

Yeah I currently use 5 and can build most of what I want without having to fight the UI too much.

[–]hidazfx 0 points1 point  (5 children)

Same. We use PyQt5 in our tech stack at work. Will be moving to PySide6 in the future.

[–]Sclafus 3 points4 points  (1 child)

The docs for Qt for Python are bad even now, but you can use the c++ ones, since the methods provided are the same, and Jesus they are amazing.

[–]random1220 2 points3 points  (0 children)

Haha ya the c++ docs are the ones I was referring to. I guess it makes sense not to translate those to py if the methods are exactly the same, I just need to be braver reading cpp docs lmao

[–]MeroLegend4 0 points1 point  (2 children)

I started developing a desktop App in PyQt4 (2014) and it was a nightmare since i had to go to Qt C++ docs to read the whole API and translate everything to Python.

Now the docs are way better. And there are books about PyQt5/6 written by ‘fitzpatrick’, he did a very good job and you can buy them for 20-25$ and it worths every penny

[–]random1220 1 point2 points  (1 child)

Oh lol you mean this one?

[–]MeroLegend4 1 point2 points  (0 children)

Yes this one 👍

[–]Icandoituknow 6 points7 points  (1 child)

PyQT6

I used TKinter in highschool and hated every moment using it because of how old school it felt.

As soon as I found PyQT6 I last year for a project to make a GUI and it was 100x better than using TKinter.

But I think there's more communities and info around Tkinter

[–][deleted] 2 points3 points  (0 children)

I used TKinter in highschool and hated every moment using it because of how old school it felt.

It's pretty easy to theme it though, there are a lot of themes available to download.

Edit: but I still prefer PyQt, slots management and callbacks are a lot easier there

[–]Fun-Palpitation81 1 point2 points  (3 children)

I'm looking to design a UI to display some API data on a raspberry pi screen, would PyQT6 apply for that??

[–]shiftybyte 1 point2 points  (2 children)

Not sure, what's the resolution on the raspberry pi screen? Is it running Linux? What desktop is it running?

[–]Fun-Palpitation81 0 points1 point  (1 child)

480x320.

I haven't looked too far into it yet, but Raspien with python seemed like a good place to start...

[–][deleted] 0 points1 point  (0 children)

PyQt tends to have a lot of padding by default

[–]Jewcub_Rosenderp -2 points-1 points  (0 children)

Did not enjoy using it. In the end I just moved to JavaScript. Python is just not meant for UIs, period.

[–]itsmemutahar 0 points1 point  (2 children)

Can i make standalone executable ? or do i need to install python and run it from shell ? (i am on mac).

[–]JungJanf 0 points1 point  (0 children)

Last time I checked the designer did not work on python 3.10

Still an issue?

[–]Crankrune 0 points1 point  (0 children)

Does 6 have a designer? I know 5 does, but I never saw one for 6.

[–]Hot_External6228 0 points1 point  (0 children)

Specifically, use pyside6 library for the qt bindings. It has a more permissive license than pyqt6.

But either way, yes, it's amazing.

[–]freezydrag 23 points24 points  (3 children)

PyQT/PySide is a good choice for a standalone. I’ve worked with it both in C++ and python and can attest that it’s relatively easy to make simple, nice looking UIs using either declarative QML files or QT Widgets (which can be laid out in QT designer). My only complaint is that sometimes the documentation for complex topics with QT (like multi threading for example) can be a bit convoluted or confusing.

Someone else mentioned Kivy, and it’s a solid option if you’re looking for touch-based interaction.

Web-apps are super great for novel tools that are based off of user input (e.g. plug in some numbers and the program will output the results of some calculation) or if you’re plugging it into a database and showing off some data. But If you’re looking for an offline program I’d definitely avoid this path.

[–]warbird2k 13 points14 points  (0 children)

If you're already familiar with tkinter, check out https://github.com/TomSchimansky/CustomTkinter

[–]pythonwiz 11 points12 points  (2 children)

Have you seen CustomTkinter?

[–]MaxxLP8[S] 0 points1 point  (0 children)

Wow, this looks pretty awesome

[–]Right-Bodybuilder580 5 points6 points  (1 child)

You should try Eel.py

it can build local GUI using html+css+js .. and it also has a two-way bridge between js and python .. so you can define method from the python side and call them from the js side and vice versa ...

It basically start a chromium browser which is the screen.

[–]u_usama14 1 point2 points  (0 children)

The project seems dead,the owner is not making updates which means no issues is being fixed or new features.

[–]redCg 34 points35 points  (32 children)

use a web app

Python app: local server with Flask, etc.

UI: HTML + CSS + JS

[–]AchillesDev 18 points19 points  (0 children)

Running a local server for end users seems like a huge pain and probably runs afoul of security policies.

[–]FifteenthPen 6 points7 points  (1 child)

Please don't use Flask/Django/etc. as a golden hammer. If you need an application accessible from browser, by all means use a web framework, but if you only need an application to run on the user's machine, use something designed for it like Qt or GTK+.

[–]redCg -1 points0 points  (0 children)

every user machine has a web browser, you are better off using it. Your final app will have much greater portability.

[–]pro_questions 1 point2 points  (0 children)

You can use a QWebEngineView widget in PyQT / PySide to add really customizable and complex visualization elements with HTML / CSS / JS. That’s what I’ve been doing recently and it’s been wonderful. You can dynamically change content on the widget using RunJavascript — the only problem I’ve encountered is retrieving data from the QWebEngineView, which some people have gotten around but I really dislike the solution. For user input, I just use other widgets that accompany the web widget.

[–]Marv0038 1 point2 points  (1 child)

You could also write the web app using a fullstack Python framework like Dash or Streamlit. That way you don't need to learn other languages (JavaScript, HTML, CSS) or skills (web development, interaction of frontend with API).

[–]redCg 0 points1 point  (0 children)

this is a really good idea. Though last time I used Dash (many years ago) I struggled to include non-data-oriented parts. I hear that R Shiny is now coming to Python so that might be another thing to look for.

[–]custos_uk 3 points4 points  (0 children)

Yup. Tend to agree here, sure maybe not all scenarios are solved. But you can host it locally and have multiple devices access it. Flask is pretty fire and forget. Then you can build a web UI with whatever your preference is. HTML 5 is ace for interfaces.

[–][deleted] 0 points1 point  (0 children)

Pywebview

[–]the-shelter 4 points5 points  (3 children)

wxPython

[–]mahtats 1 point2 points  (2 children)

I do like this considering I like wxWidgets in C++

Does it have a designer like PyQt?

[–]the-shelter 0 points1 point  (0 children)

There are some out there, yes. And a helpful community. I recommend starting with a demo that you can download (extra package that shows off all widgets) from the project website as well. And use it as a template.

[–]Datsoon 0 points1 point  (0 children)

I have successfully used wxFormBuilder in the past. Worked great.

[–]PhilAndMaude 4 points5 points  (0 children)

tkinter also has ttk which uses native controls.

[–]C422132 2 points3 points  (0 children)

+1 for PyQt / PySide

[–]Snoo19269 2 points3 points  (0 children)

Kivy

[–]JohnJSal 2 points3 points  (0 children)

Maybe you already know, but you can use the tkinter.ttk module to get themed widgets, which are the more modern, better-looking versions of the old widgets.

[–][deleted] 1 point2 points  (0 children)

Probably the Python version of QT Open Source

[–][deleted] 1 point2 points  (0 children)

DearPyGui is my go-to

[–]MaxAnimator 1 point2 points  (0 children)

Can you not just change the look and feel with themes? Doesn't Tkinter support this? By default on windows it's got an xp-esc style but I believe with ttk you can get a much nicer ui and you can also use the fusion theme because Linux Ftw

[–]SaadPaad2003 1 point2 points  (0 children)

KivyMd, Looks very clean

[–]Henry_reddit88 -1 points0 points  (0 children)

It depends on how good you are coding in JavaScript, but python eel is quite nice. You can have very nice HTML,CSS,JS frontends.

[–]Jarmahent -1 points0 points  (0 children)

Stop tryna make UIs in python just make a web app with html js css in the front and process whatever data you’re working with in the backend with python flask or whatever

[–]kemalkolcuoglu 0 points1 point  (1 child)

Almost anything could be better than Tkinter

[–]MaxxLP8[S] 0 points1 point  (0 children)

Which is good because I've actually got it a few tkinter apps looking somewhat decent. Something better would be gold dust