We will create reusable GUI components using Python. In this recipe, we will keep it simple by moving our ToolTip class into its own module. Then, we will import and use it to display tooltips over several widgets of our GUI.
Creating reusable GUI components
Getting ready
We are building our code from Chapter 3, Look and Feel Customization: GUI_tooltip.py. We will start by breaking out our ToolTip class into a separate Python module.
How to do it...
We will create a new Python module and place the ToolTip class code into it and then import this module into our primary...