DEV Community

natamacm
natamacm

Posted on

Which one should I use for GUI wxpython or pyqt?

First let's compare the two so that you can make an informed decision. Both can be used to create GUI applications with Python.

That being said, PyQt has a lot of software available and a lot of learning resources. wxPython on the other hand seems more hobbyist, the amount of learning material is simply no match.

Programming methodology

PyQt and WxWidgets are both object oriented. That means you have to know about classes and objects when programming either one of them.

Because everything in Python is an object it makes sense to know object orientated programming.

Look and feel

wxPython uses the native toolkit on each operating system. This may cause some widgets to be available on one platform but not on the other.

PyQt uses the "Qt" style and you can change the style you use for your Qt applications.

Some of the available styles are (depending on your operating system):

  • 'Breeze'
  • 'Oxygen'
  • 'QtCurve'
  • 'Windows'
  • 'Fusion'

pyqt style

GUI module

PyQt provides you with the concept of signals/slots that let you build your project as a set of components. WxPython on the other hand uses callbacks.

PyQt comes with a designer program that lets you build any desktop software. WxWidgets or wxPython on the other hand, has some third party designers but they don't match the amount of features PyQt has.

pyqt designer

Why PyQt?

PyQt is not only a GUI library, it can do databases, networking and a lot more. At the same time, wxPython is only for GUI programming.

PyQt has a lot of example howtos and books, the amount of learning material is a lot larger for PyQt than wxPython.

If you are new to PyQt, I recommend this PyQt book.

Top comments (1)

Collapse
 
netowill97 profile image
will.py

Recently i chose TKinter instead of PyQt because of the open source, didn't know wxPython.
Great contribution, thanks!