21

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.

Sam
  • 1,509
  • 3
  • 19
  • 28
Tennesseej
  • 399
  • 2
  • 3
  • 11
  • Most toolkits match your system theme, so the UIs you make with them will look like "regular" programs. – Blender Jul 04 '13 at 08:22
  • 4
    The thing is, I am running Windows 7 and most GUI's look nice and modern, but when I run my self-made GUI's from my Python code they come out Windows 95 style. – Tennesseej Jul 04 '13 at 08:28
  • There are dozens of Python UI toolkits out there. Which one are you using? – Blender Jul 04 '13 at 08:29
  • I have made quick examples in tkinter, wxPython and PyGTK – Tennesseej Jul 04 '13 at 08:36
  • Odd. They all work just fine for me. – Blender Jul 04 '13 at 08:59
  • On wxPython try running the Samples and Demos installer and then in the python 2.7 version take a look at the Advanced Generic Widgets folder. AFAIK they have not been fully ported to python 3.3 yet as part of Project Phoenix. – Steve Barnes Jul 04 '13 at 10:10
  • 1
    wxPython UIs will fall back to the old style if it is not able to load the new(ish) themed common controls DLL. There really shouldn't be any problem doing that anymore, although I suppose that if you have an old wxPython or perhaps a custom built Python then that may be what you are seeing. – RobinDunn Jul 05 '13 at 17:56

4 Answers4

15

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.

Bryan Oakley
  • 370,779
  • 53
  • 539
  • 685
2

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.

kalx
  • 21
  • 2
2

You can use htmlPy. So you can create GUI's with css html js with good looks.

Eren Arıcı
  • 749
  • 1
  • 6
  • 12
1

QT is a good choice in many cases, but sometimes you need much faster response time, or native support of OpenGL(ES), or just another license. There are a lot of alternatives:

luart
  • 1,383
  • 1
  • 18
  • 25