QRCODE
The QRCODE widget consists of a QR code and a background (white).

Create UI widget
const qrcode = hmUI.createWidget(hmUI.widget.QRCODE, Param)
caution
Amazfit band 7 does not support this widget.
Type
Param: object
| Properties | Description | Required | Required |
|---|---|---|---|
| content | QR code content | YES | string |
| x | QR Code x Coordinate | YES | number |
| y | QR Code y Coordinate | YES | number |
| w | QR code width | YES | number |
| h | QR code height | YES | number |
| bg_x | Background x coordinates | NO | number |
| bg_y | Background y coordinates | NO | number |
| bg_w | Background width | NO | number |
| bg_h | Background height | NO | number |
Code example
Page({
build() {
const qrcode = hmUI.createWidget(hmUI.widget.QRCODE, {
content: 'Hello Zepp OS',
x: 140,
y: 140,
w: 200,
h: 200,
bg_x: 120,
bg_y: 120,
bg_w: 240,
bg_h: 240
})
}
})