Changed命名的,即属性名后面加上Changed。比如说当x属性改变时,xChanged信号会发出。注意通常也会有具体的槽来处理这个信号。
属性说明
activeFocus : bool
这个属性表明当前的item是否处于焦点状态。一个item只有在处于焦点的状态或者是一个FocusScope中的一个元素下才能
接收键盘输入。通常,当对某个item设置焦点以及对包含它的FocusScopes设置焦点时,activeFocus被置为真。在下面的
例子中,input将会有一个为真的activeFocus。
Rectangle {
FocusScope {
focus: true
TextInput {
id: input
focus: true
}
}
}
anchors.top : AnchorLine
anchors.bottom : AnchorLine
anchors.left : AnchorLine
anchors.right : AnchorLine
anchors.horizontalCenter : AnchorLine
anchors.verticalCenter : AnchorLine
anchors.baseline : AnchorLine
anchors.fill : Item
anchors.centerIn : Item
anchors.margins : real
anchors.topMargin : real
anchors.bottomMargin : real
anchors.leftMargin : real
anchors.rightMargin : real
anchors.horizontalCenterOffset : real
anchors.verticalCenterOffset : real
anchors.baselineOffset : real
这几个有关锚anchor的属性是用来定位这个item的,具体解释请参考QML中基于锚的布局
children : list- 只读
resources : list