I use PyQt5 for this project. This a snippet of the code:
class MainWindow(QMainWindow): def __init__(self):