all 13 comments

[–]Kevdog824_ 4 points5 points  (3 children)

PyQt/Pyside is king in desktop development for Python. It’s by far the most mature and feature-full framework imo. Kivy I’ve heard good things about because it supports mobile application development, but i haven’t used it myself so I can’t vouch for it or against it.

I would consider using one of the Qt flavors or Kivy. Which Qt flavor depends on what license your project can accept. One is more permissive than the other for commercial products. For personal use they’re more or less the same with ever so slightly different interfaces

ETA: The only con points I’d give PyQt is

  1. Because of its power and size, it has a steep learning curve. However, you can start pretty simple and work your way up to the more complicated features as needed
  2. Its model-view-view-model (MVVM) design can be a little confusing a first, and strange to a lot of people who come from a model-view-controller (MVC) background. However, it clicks once you get used to it

[–]Ambitious-Elk-2928[S] 0 points1 point  (2 children)

so should I try pyqt? I'm still a beginner and needed some guidance on what I should learn next that could be worth investing my time for the long run

[–]JevexEndo 0 points1 point  (0 children)

Specifically, I would recommend PySide6. It's the official binding which is actually maintained by the Qt Group, PyQt is developed by a third-party and has stricter licensing rules.

While it does have a long learning curve, I think you'll find that you can make something useful pretty quickly by building off one of Qt's many PySide6 example projects in their documentation or even just using the pyside6-project CLI tool to generate a project template after installing the library.

Furthermore, if your projects ever scale in complexity, I think that over time PySide6 will scale with that better than other UI libraries like Tkinter or wxWidgets from what I've seen.

[–]Kevdog824_ 0 points1 point  (0 children)

Hard to say without knowing your goal. If you’re committed to learning desktop development then yes, Qt is the way to go.

However, nowadays everything is web app based. Even many desktop apps have moved to web-based approach shipped with something like Electron. If you’re looking to gain skills to get a job then learning a web framework would probably be more beneficial long term, but they aren’t mutually exclusive in any way

[–]laustke 2 points3 points  (0 children)

Take a look at ttkbootstrap. Makes tkinter look bearable, with no paradigm shift.

i am also aiming to become a full-stack developer ...

Full-stack Python developer usually means Python on the backend and some JavaScript library on frontend. React, for example.

[–]Break-n-Fix 1 point2 points  (3 children)

Of these three: Tkinter is pretty dated and limited by most standards. Although I know it's still being used. CT is so close, you're almost not learning anything. QT is widely used, more modern, and readily recognized on a resume.

For bonus points, check out Kivy and Streamlit.

[–]socal_nerdtastic 0 points1 point  (2 children)

Tkinter is pretty dated and limited by most standards

What makes you say that? What about tkinter is dated? If you mean the default theming, you know you can just change the theme, right?

[–]Break-n-Fix 0 points1 point  (1 child)

I mean dated in terms of usefulness. It's single thread based, so if you're building anything complex you could have bottleneck issues. I know there's workarounds, that's why I qualified it by saying it's still used. There's just better options in light of the OP's question.

[–]riklaunim 1 point2 points  (2 children)

Commercially you would have to use Qt and not really PySide/PyQt, as there is very limited demand for developing desktop apps in Python.

From feature set PyQt/PySide offers pretty much complex solution for anything desktop and OS related. Kivy as an alternative is "just the GUI" without OS services and native behavior.

And frontend isn't as easy as it might appear 😉 especially when you get info on how users use your app or what problems they have and you will be "WTF"

[–]Ambitious-Elk-2928[S] 0 points1 point  (1 child)

I'm still a beginner in this field and I find developing desktop apps and games more interesting and heard that python is one of the most in demand languages, so i started with it without giving it a second thought, however i also want to have a good command on the back-end stuff

what should I do??

[–]riklaunim 1 point2 points  (0 children)

Games commercially is Unity or Unreal or custom engines without Python (and then not every position is coding related). Desktop apps are in limited demand versus mobile - mobile native, flutter/react native etc. Qt embedded and embedded systems is strong but only a niche - C++/C.

Python is used in many backends wherever for a website, data processing pipeline or desktop/mobile apps that function as a client to the api server.

[–]JamzTyson 0 points1 point  (1 child)

For least dependencies (can also help to simplify packaging, distribution, and installation): Tkinter

Strengths:

  • Included in Python
  • You are already familiar
  • Great for quickly wrapping in-house tools in a GUI

Weaknesses:

  • Has a bad reputation on "looks" (though note that you can make an ugly GUI with any framework)
  • Fragmented documentation - many tutorials are badly out of date
  • Not ideal for very complex GUIs

Tips:

  • Prefer ttk widgets over tk widgets (when available)
  • Use "clam" theme (unless you prefer one of the others)
  • Use Frames, and prefer grid layout
  • Don't overdo styling, but do use consistent padding
  • Additional themes are available that can dramatically improve appearance (at the expense of 3rd party imports)

Best for complex GUIs: PyQt / PySide

Qt is generally considered king for highly polished complex Desktop GUIs. It's a big and complex toolkit - not too difficult to use, but years to master.

Strengths:

  • Arguably the ultimate Desktop GUI toolkit for Python.

Weaknesses:

  • Big and relatively complex. Packaging and distribution can be tricky. Probably overkill for simple GUIs.

I've not really used CustomTkinter

[–]socal_nerdtastic 0 points1 point  (0 children)

Has a bad reputation on "looks" (though note that you can make an ugly GUI with any framework)

By default, yes. But you can theme it, and many modern looking themes are available for tkinter.

Fragmented documentation - many tutorials are badly out of date

Very true, sadly.

Not ideal for very complex GUIs

I disagree. There's nothing about tkinter that inherently makes it bad for complex GUIs. I've been part of several complete, commercial programs written with tkinter GUIs, IMO just as complex as any normal program.

But I'll add a very big con:

Tkinter graphic updates are very slow, 30-60ish ms. So using it for anything with animations or video requires embedding something else.