A checkbox is supported by PyQt. The widgets name is QCheckBox. If you create a checkbox you can set it to be checked by default using the .toggle() method.
The first parameter after the QCheckBox call is the label text that’s right next to the checkbox. In this article you’ll learn how to place single checkboxes, but you can just as easy create them in a for loop.
Download PyQt examples
Import QCheckBox from PyQt5.QtWidgets. Then to create a new checkbox, just call:
cb = QCheckBox('Movie', self)
Where the first parameter is the label next to the checkbox. Then set the position and if you want it checked
If you want to call a method if the checkbox is called, you can do that like this:
The program below creates two check boxes in a window. One of the checkboxes is toggled because the method .toggle() is called.