Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Modern GUI programming in Python 3.3

Tags:

I am putting together a few programs, and it's about time to start making GUI's for some of them. The code is currently written in Python 3.3.

I have researched a few GUI's for Python, namely Tkinter, wxPython and PyGTK. Everything I am finding seems to only create GUI's that look fairly archaic. I have created a couple of example GUI's, and they all work, they just look very Windows 95.

An example of what I am finding/creating: http://python.6.x6.nabble.com/file/n4545517/MLDataAnalyzer5.png

An example of what I want-ish: http://images.six.betanews.com/screenshots/1237236321-1.jpg

Is it simply an advanced knowledge of how the GUI's work, or are there just GUI modules more suited for "modern" looking GUI's?

If it is advanced knowledge of how the GUI's work, are there some tutorials out there for how to make GUI's look more "modern".

Thanks in advance.

like image 587
Tennesseej Avatar asked Jul 04 '13 08:07

Tennesseej


People also ask

Can you make modern GUI with Python?

PyQt is a great library to develop modern flat GUI in python. You can create applications with coding in python which can be a little difficult and overwhelming but as we are covering the easiest way possible you can even make GUI with a drag-drop builder known as PyQt5Designer.

How do I create a GUI in Python 3?

Tkinter ProgrammingImport the Tkinter module. Create the GUI application main window. Add one or more of the above-mentioned widgets to the GUI application. Enter the main event loop to take action against each event triggered by the user.


2 Answers

After a lot of research I've decided to use the Qt bindings library for Python called PyQt5 (http://www.riverbankcomputing.com/software/pyqt/download5). It's quite easy to implement and has tons of documentation. The interface elements (called widgets in Qt) look exactly like the ones in the host operating system: if you run the program in Windows 95, they'll look like that, same for Windows 7, and even MacOS. I find Qt extremely powerful. I'm developing a Python/MySQL application and the QtSql module helps a lot in the development with creating tables.

like image 40
kalx Avatar answered Oct 10 '22 03:10

kalx


Tkinter comes with a set of widgets called "themed tk", provided by the ttk module. It provides more modern-looking alternatives to some of the core widgets such as buttons and labels, and it also has a few new widgets such as a notebook and tree.

like image 80
Bryan Oakley Avatar answered Oct 10 '22 03:10

Bryan Oakley