-
常量
Rectangle{
width:10
} -
变量
Rectangle{
width: rect1.width*2
} -
表达式
Rectangle{
width: rect1.width > rect2.width ? rect1.width : rect2.width
} -
代码块
Rectangle{
width: {
if(rect3.visible)
return rect3.x + rect3.width
else
return rect3.width;
}
}
原文:https://blog.csdn.net/doujianyoutiao/article/details/85258393