Graphical User Interface (GUI)
The Front-End, Interface
User Interface (UI) — what the user sees when they interact with the system
Graphical User Interface (GUI) — a UI that provides graphics and images to aid the user’s usage of the system
Natural User Interface (NUI) — a UI that is designed around an individuals natural movement patterns (Kinect, Leap Motion,...)
Command-driven Interface — is an interface where the user types commands and the system interprets those commands to perform tasks
Menu-driven Interface — commands are presented in some graphical way (through menu or icons). The user does not need to memorize the commands.
tkinter is Python’s standard GUI (Graphical User Interface) package.
An object-oriented layer on top of widely used graphics library Tk.
Allows you to create windows with gadgets/widgets in them.
import tkinter – OR – from tkinter import *
e Qt (pronounced ”cute”) a cross-platform application framework and widget toolkit for creating a variety of software interfaces
run on various software and hardware platforms with little or no change in the underlying codebase (mobile as well)
Qt is currently being developed both by The Qt Company, a publicly listed company, and the Qt Project under
available under both commercial licenses and open source.
The majority of tkinter is in the single module and is a part of python3 (no needing to use pip to download from PyPi.org
Qt can be used in several other programming languages via
language bindings (Used in Python via PySide2)
NEED to install: pip install PySide2
The python bindings are complex and Qt is a full-blown application framework, that allows resource management/networking/graphics/user interaction/etc...
Qt modules Starting with Qt 4.0 the framework was split into individual modules.
With Qt 5.0 the architecture was modularized even further. Qt is now split into essential and add-on modules.
We will be importing specific classes and only scratching the surface of the full capability of Qt
The back-end that the bindings interact with are written in C++...which allows for more efficent code
First GUI Application
The only tkinter module needed import tkinter
# Creates a tkinter widget application app = tkinter.Tk()
print(type(app)) # <class ’tkinter.Tk’>
# PySide2 has a lot of sub-modules, import some as we go
from PySide2 import QtWidgets
# Creates a Qt widget application app = QtWidgets.QApplication() print(type(app))
# <class ’PySide2.QtWidgets.QApplication’>
First GUI Application 2
The applications are created, ready to be deployed to memory, BUT it must be executed for it to do anything of interest. Right now it is just created and sitting dormant.
app = tkinter.Tk() # Creates a tkinter app app.mainloop() # Run App
from PySide2 import QtWidgets
app = QtWidgets.QApplication() # Creates a Qt app app.exec_() # Run App
e For Qt, It looks like the shell/IDE froze: That’s because the application is now running...there is no user control though, can’t stop unless we force quit it (CTRL+C)
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of