头像
QAvatar 组件可创建一个可扩展、可着色的元素,其形状内可包含文本、图标或图片。默认情况下,它是圆形的,但也可以是正方形,或者应用 border-radius 为正方形添加圆角。
¥The QAvatar component creates a scalable, color-able element that can have text, icon or image within its shape. By default it is circular, but it can also be square or have a border-radius applied to give rounded corners to the square shape.
它通常与其他组件在其插槽中使用。
¥It is often used with other components in their slots.
用法(Usage)
¥Usage
提示
size
属性将决定头像的高度和宽度。font-size
属性将设置头像中使用的字体大小,这将影响字母和图标的大小。
¥The size
property will determine the height and the width of the Avatar. The font-size
property will set the size of the font used within the Avatar, which will have an effect on the size of letters and icons.