Item元素是所有可视元素的基元素,他定义了所有可视元素的通用属性。
几何:x, y, width, height
布局:anchors(left, right, top, bottom, vertical center, horizontal center)和margins
按键:Key, KeyNavigation, 和focus
变换:scale, rotate, transform和transformOrigin
可视:opacity, visible, clip, smooth
状态:state, states和transitions
Retangle元素用于显示矩形区域,除了以上属性还支持:
边框:border.color, border.width, border.color
圆角:radius
颜色:color
渐变:gradient
Text元素用于显示文本,没有背景颜色。
文字:text,根据文字计算元素所需的宽高。
颜色:color
字体:font.family, font.pixelSize
对齐:horizontalAlignment, verticalAlignment
样式:style, styleColor如轮廓,凸起,下沉等
省略:elide
换行:wrapMode需要指定width
Image元素显示各种格式的图片。
图片源:source
填充模式:fillMode
MouseArea元素用于捕捉鼠标事件,矩形不可见,需要与其他可见元素配合使用完成用户交互。
处理器:onClick执行各种函数