has been completed.

This commit is contained in:
xyz
2025-09-09 15:37:57 +08:00
parent 83f3f4f74e
commit 89ff4fbac0
38 changed files with 2679 additions and 161 deletions

32
verifycodewidget.h Normal file
View File

@ -0,0 +1,32 @@
#pragma once
#include <QWidget>
#include <QRandomGenerator>
class VerifyCodeWidget : public QWidget
{
Q_OBJECT
public:
explicit VerifyCodeWidget(QWidget *parent = nullptr);
//通过这个函数生成随机的验证码字符串
QString generateVerifyCode();
//刷新并把当前验证码显示到界面上
void refreshVerifyCode();
//检验验证码是否匹配
bool checkVerifyCode(const QString& verifyCode);
void paintEvent(QPaintEvent* event) override;
void mousePressEvent(QMouseEvent* event) override;
private:
//随机数生成器
QRandomGenerator randomGenerator;
//保存验证码的值
QString verifyCode = "";
signals:
};