Code to support our PyQt Event-driven programming course (Part 2)