onCheckedChanged和onCheckStateChanged有什么区别?当我选中/取消复选框时,两者产生相同的结果。
import QtQuick 2.12
import QtQuick.Controls 2.4
import QtQuick.Layouts 1.3
Page {
id : somepageid
CheckBox {
checked: true
text: qsTr("Check Me")
indicator.width: 15
indicator.height: 15
onCheckedChanged: {
console.log(checked)
}
onCheckStateChanged: {
console.log(checked)
}
}
}https://stackoverflow.com/questions/63186903
复制相似问题