CheckBox QML Type
import QtQuick 2.14
import QtQuick.Window 2.14
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.15
Window {
id:window
width: 640
height: 480
visible: true
title: qsTr("Hello World")
Item{
id:root
anchors.fill: parent
ColumnLayout {
CheckBox {
checked: true
text: qsTr("First")
onCheckedChanged: {
if(checked){
console.log(text + "checked")
}
}
}
CheckBox {
text: qsTr("Second")
onCheckedChanged: {
if(checked){
console.log(text + "checked")
}
}
}
CheckBox {
checked: true
text: qsTr("Third")
onCheckedChanged: {
if(checked){
console.log(text + "checked")
}
}
}
}
}
}