When writing script tools for ArcGIS, we mainly relied on the script tool dialog box provided by ArcGIS for a GUI that allows the user to provide values for the input variables of our script tool in a convenient way. In our Python code, we didn’t have to worry about the dialog box; this was all automatically taken care of by ArcGIS based on the parameters we declared for our script tool. Being able to create and use your own GUIs in Python can be very useful. For instance, when you want to create a script tool that requires a lot of interaction with the user and needs additional input while executing (an example of such a tool will be discussed later in this lesson).

To create a GUI in a given programming language and for a given platform, you can often choose between different GUI libraries (also called GUI toolkits) available for that language and platform. These GUI libraries define classes and auxiliary functions that allow for creating, combining, connecting, and managing the different components of a GUI such as windows, buttons, etc.,. with a minimal amount of code. Often, GUI libraries are also simply referred to as GUIs, so the term can either mean a particular software library or package used for creating graphical interfaces or the concrete interface created for a particular application. Some libraries contain much more than just the GUI related classes and components. For instance, the Qt6 library we are going to talk about and use later on is actually a cross-platform application development framework with support for non-GUI related things like database and network access.
A GUI library is often complemented by additional tools for supporting the creation of graphical interfaces with that library. Some languages provide a GUI library as part of their standard library, so it is directly available on all platforms the language is available for without having to install additional 3rd party packages. GUI libraries are also available for different languages, like the already mentioned Qt library that is written in C++ but can be used with a large number of different programming languages. Wrapper packages, also called bindings, allow the components and functionality of the library to be available in the respective other programming language. In the case of Qt, two commonly used wrapper packages named PyQt and PySide (see Section 2.5.2.1) exists for Python. In the next section, we will briefly cover the main concepts and techniques related to GUI development that we encounter in most GUI libraries.