WiseOwl Training - Established 1992 Wise Owl Training

Established May 1992
30 years in business
Wise Owl Training
30 years in business
See 519 reviews for our classroom and online training
Should you be using QT for Python as a GUI?
Part two of an eight-part series of blogs

If you need to build a GUI system in Python, PyQt5 is probably the best choice, but don't take our word for it - read this blog and see what you think.

  1. Should you be using PyQt?
  2. QT Designer (this blog)
  3. Widgets
  4. Layouts
  5. Forms and code
  6. Slots and Signals
  7. CSS and Formatting
  8. Models and Data

Posted by Andy Brown on 21 June 2022

You need a minimum screen resolution of about 700 pixels width to see our blogs. This is because they contain diagrams and tables which would not be viewable easily on a mobile phone or small laptop. Please use a larger tablet, notebook or desktop computer, or change your screen resolution settings.

QT Designer

QT comes with its own designer, although many diehard programmers prefer to write commands to position widgets on screen (see later in this series of blogs for more on this):

QT Designer

Here I've created a simple form containing 4 widgets: a Label widget, a LineEdit widget and two PushButton widgets.

The designer comes with an Object Inspector window:

Object Inspector

The parts of the form shown above as displayed in Object Inspector (every blank form comes with a menu bar and a status bar by default, although at the moment these will be blank).

 

There's also a conventional Properties window:

Properties window

Some of the properties for the OK button in our basic form.

The other main window is the Widget Box, which allows you to add widgets (often called controls in Microsoft applications) to a form:

The Widget Box

The start of the widgets for QT Designer - there are many more, as shown in the next part of this blog.

 

The QT Designer is straightforward to use, although understanding the behaviour of layouts is challenging!

This blog has 0 threads Add post