Eren Arıcı
Eren Arıcı

Reputation: 769

How to create beautiful UI's with Python

I wonder if it's possible to create good looking desktop UI's with python? Could I use JS frameworks like Electron with python? Or are there any python libraries which provide modern looking and easy to use widgets?

This is what I have in mind for the appearance:

Something like that.

Image Credit: https://dribbble.com/jnhffmnn

Is this possible and where can I find resources on how to get started?

Upvotes: 45

Views: 192014

Answers (4)

ZackBoi
ZackBoi

Reputation: 341

Like what people have already said, it depends on what you are trying to put inside of your GUI and where you want to put it. But, all of the other GUI programs that others have suggested were hard for me to download and downright difficult to learn. I assume you have used tkinter before (which has disappointing aesthetics), and are unwhelmed by the format of the premade button, entry, and other widgets.

What I recommend doing is not downloading other libraries and software, but rather sticking with tkinter and only using label widgets and the bind function, which is detailed here. What the bind function allows you to do is call an action (function) when a mouse click, keyboard entry, etc... occurs over a certain widget. Essentially, you can make a button by binding the mouse click action with a label. Whenever you click on the label in the GUI, the function is called, however, now you don't have the ugly border around the text and it looks nicer. Similarly, you don't have to use the entry widget, you can bind a keyboard event over an empty label. Then inside your code, you can add whichever keyboard letter/number you press into the stringvar that control the text in the label. The list goes on and on, but essentially you would be using only labels, frames, and canvas' with the bind function to make cooler looking GUI's.

Here's an example of how I made a nicer looking radiobutton grid... enter image description here

With this, I can customize the size of the circles to match the size of the text, change the color of the selected and unselected circles, and change the spacing between the text and the button circles.

Upvotes: 8

Daniel
Daniel

Reputation: 61

Hi it looks like what you are asking is EXACTLY what pysciter is targetting. The only caveat is the fact that this is still new and possibly a bit green

https://github.com/sciter-sdk/pysciter

Upvotes: 6

user8128255
user8128255

Reputation: 132

It depends where you want to use these dashboards, for device independent applications for IoT stuff (like Raspberry Pi), I would prefer Thingsboard as its opensource. Otherwise if you don't care about Losant is also a good choice. But as scotty3785 mentioned, for not webbased applications Kivy is a very good choice.
But it just depends on your case what you choose.

Upvotes: 5

scotty3785
scotty3785

Reputation: 7006

Best options I've seen for 'pretty' GUIs with python is Kivy, see the gallery of examples

Upvotes: 18

Related Questions