If you need to display a two-dimensional code, you can quickly implement it using the existing
two-dimensional code control. The specific steps are as follows:
- Double click to open the UI file
- Find the
QR codecontrol in the control set on the right
- Left-click the
QR codecontrol and hold it, then drag it to any position, release the left button, and you can see the control of the automatic QR code.
Select the QR code control just generated, and in the property bar on the right side of the editor, you can modify the content of the QR code, and you can see that the QR code image will change simultaneously.
In addition to setting the QR code content through the tool, we can also dynamically set the QR code content through the code:
bool loadQRCode(const char *pStr);
For the specific use of the QR code control, please refer to the QrCodeDemo project in Sample Code