Using an additional Python GUI library

Abstract: The App Editor and the Dialog Designer provide an easy and convenient way of adding a graphical user interface to your App — see User-defined dialogs. GUIs which are created this way seamlessly integrate into the look and feel of ZEISS INSPECT. However, there are reasons why using a separate Python GUI library might be preferred. This article gives a brief overview on use-cases, options and installation.

Use-cases

There are three main reasons for using an additional GUI library:

  • You are missing an important feature in the App development environment

  • You want to integrate existing Python GUI code into an App

  • You are already familiar with a GUI library as a developer

Options

Which Python GUI library should you use? - Comparing the Python GUI libraries available in 2023 gives an excellent overview on available options.

The most relevant libraries for App development are:

  • PyQt5/PySide2

  • PyQt6/PySide6

  • Tkinter

PyQt and Pyside are technical siblings, but they are provided with different licenses — see PyQt vs PySide Licensing.

ZEISS INSPECT currently uses Qt5, so implementing an App with PyQt5/Pyside2 will definitely integrate seamlessly into the look and feel.

Tkinter’s look and feel differs significantly from the usual Windows/ZEISS INSPECT GUIs. It is probably only an option if you have to integrate legacy code.

Installing PyQt

Both PyQt5 and PyQt6 have to be installed as described in Using Python wheelhouses. Additionally, the Python packages PyQt5-sip or PyQt6-sip, respectively, have to be installed with the App Explorer.

Installing PySide

Both PySide2 and PySide6 have to be installed as described in Using Python wheelhouses.

Tkinter

Tkinter is already part of the ZEISS INSPECT Python installation.