r/learnpython • • Oct 10 '23

Best way to Create responsive Modern GUIs in Python ?

In my opinion PyQt5 (or pyside6 no difference i think ) is the best option because it has its own QT designer + Ide but I dont how we can make it more modern ,

I m building a windows app as a side project i need some suggestions

18 Upvotes

24 comments sorted by

3

u/my_password_is______ Oct 10 '23

flask

3

u/Skbhuvai Oct 10 '23

I m building a windows app how is flask gon help? 🤔

3

u/ExpressionMajor4439 Oct 10 '23 edited Oct 10 '23

Probably not what they mean but PWA is a thing (and Flask can do this as well)

1

u/Fernando7299 Oct 10 '23

You can use Flask web Gui

2

u/Lawson470189 Oct 10 '23

I haven't used Flask Web GUI before but it looks fairly similar to the Django renderer. Have you used both before? How do they stack up?

2

u/Fernando7299 Oct 10 '23

I haven't used Django rendered.

6

u/[deleted] Oct 10 '23

These are my suggestions based on my own personal experience:

  1. Kivy (Mobile and desktop support).
  2. PyQt5 + PySide6 (No diff)
  3. Customtkinter (it is a custom version of tkinter that allows for a more modern look)
  4. PySimpleGUI

4

u/[deleted] Oct 10 '23

Kivy can also be deployed to iOS

3

u/[deleted] Oct 10 '23

Which is why it can be very useful.

5

u/[deleted] Oct 10 '23

Right tool for the job goes a long way. I learned typescript / React this year for a proper front end that was previously a streamlit app. It was far easier to execute interfaces than the puren python approaches I'd tried.

2

u/JamzTyson Oct 10 '23

You need to learn about design. Any GUI toolkit can produce a "modern" look, though some may require a bit more effort than others (such as tkinter / wx). Conversely, you can create a bad GUI with any GUI toolkit.

I'd suggest that you focus on functionality and clean code initially.

2

u/Ghibl-i_l Oct 11 '23 edited Oct 11 '23

You can use Streamlit, if your app doesn't have complex state rules, pros: modern-looking, super fast to build, easy to learn. Cons: the more complex state tracking/rules get, the harder it is to hack a workaround of Streamlit's "re-run the whole script after every signal/event"

You could just find some nice QSS templates online (like CSS but for Qt).

Personally, for small, simple projects (like personal automation tools) I'd use Streamlit. It just looks super nice and as for "windows app" who cares if it runs in a browser?

Unless the goal of the exercise is specifically to build a desktop GUI app instead of just building some GUI.

As a bonus, if you use Streamlit, you got yourself a web-app too if you deploy it somewhere.

Edit: by state rules I mean like lots of different objects doing their own computations and interacting with each other and having state. Originally Streamlit was made for building quick, beautiful data dashboards, but with time some app features were added, like "rerun the script" or "st.session_state" which allows to keep state between different script runs.

1

u/throwaway6560192 Oct 10 '23

Use Qt QML. It allows more custom and modern UIs.

1

u/jclthehulkbuster Oct 10 '23

I'm currently building an app with flet it looks really really nice. Built off the flutter framework. You will have to really compose any complex display features as it's not at 1.0 yet but overall the experience has been good.

1

u/outceptionator Newbie Oct 10 '23

I like Flet

1

u/i_draco Oct 10 '23

RemindMe! 2 day

1

u/RemindMeBot Oct 10 '23

I will be messaging you in 2 days on 2023-10-12 08:00:52 UTC to remind you of this link

CLICK THIS LINK to send a PM to also be reminded and to reduce spam.

Parent commenter can delete this message to hide from others.


InfoCustomYour RemindersFeedback

0

u/[deleted] Oct 10 '23

[deleted] — view deleted comment

3

u/mandradon Oct 11 '23

I wrote a windows forms app the other day. I generally consider myself to be one of the worst UI designers, but I managed to create something that was functional for its purposes for my 10 year old kid.

I really would also recommend using c# for something like this unless Python was a requirement.

Unless OP wanted to make a webapp.

0

u/[deleted] Oct 10 '23

[deleted] — view deleted comment

2

u/Stotters Oct 10 '23

I'm using wxPython myself, but it doesn't really look native in Windows 10/11 at all.

Thankfully, it is extremely customizable and I msnaged to make my application look the part.

5/7, I'd use it again.

0

u/[deleted] Oct 10 '23

[deleted] — view deleted comment

2

u/Stotters Oct 10 '23

Yeah, the widgets are not caught up to the current UI style of Windows.

I just ended up using loads of workarounds and custom classes to make it look current.

7

u/[deleted] Oct 10 '23

[removed] — view removed comment

1

u/[deleted] Oct 11 '23

Any specific complaints? Just curious