PySide6-Code-Tutorial
PySide6-Code-Tutorial copied to clipboard
Learning
@QtCore.Slot(int)
def test_slot(state: int) -> None:
if state == Qt.Checked:
print("复选框被选中了!")
elif state == Qt.Unchecked:
print("复选框被取消选中了!")
elif state == Qt.PartiallyChecked:
print("复选框被部分选中!")
这里需要添加.value
。