PyQt5 tutorial - CheckBox

PyQt5 tutorial - CheckBox

In deze tutorial gaan we QCheckBox leren in PyQt5. A QCheckBox is een optieknop die kan worden in- of uitgeschakeld. Gebruiker kan meerdere opties in de selectievakgroep aanvinken. CheckBox Voorbeeld import sys from PyQt5.QtWidgets import (QWidget, QLabel, QHBoxLayout,QCheckBox, QApplication) class basicWindow(QWidget): def __init__(self): super().__init__() layout = QHBoxLayout() self.setLayout(layout) self.checkBoxA = QCheckBox("Select This.") self.labelA = QLabel("Not slected.") layout.addWidget(self.checkBoxA) layout.addWidget(self.labelA) self.setGeometry(200, 200, 300, 200) self.setWindowTitle('CheckBox Example') if __name__ == '__main__': app = QApplication(sys.

25 juni 2020

Tags

PyQt5 Button

Meest populaire artikelen

Laatste artikels