QT 및 QML을 완전히 새롭게 함. 나는이 때에 프로퍼티가 callValue
및 handRaiseXBB
두 배 사이의 관계를 기반으로 사각형의 색상을 설정하기 위해 노력하고있어,하지만 난 오류를If QML의 진술
예기치 않은 토큰을 얻을
및
"만약예상은 규정 된 이름 아이디
사람이 어떻게 도이 누구인지 말해 줄 수 틀렸어?
import QtQuick 2.0
Item{
id: hand
property double callValue: 0.0
property double handRaiseXBB: 100
property string handCallColor: "green"
property string handFoldColor: "grey"
Rectangle {
anchors.fill: hand
if (hand.callValue >= hand.handRaiseXBB) {
color: hand.handFoldColor
}
else {
color: hand.handCallColor
}
}
}
그냥 QML은 선언적 언어이며, 당신이 기능에 필수적 코드를 작성할 수 있다는 것을 기억하거나 속성 바인딩은 포함하지만 객체 정의에는 포함되지 않습니다. – QtRoS