当前仓库属于关闭状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 0

xvdongming / PassWordInputFilter
关闭

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
teventfilter1.h 1.06 KB
一键复制 编辑 原始数据 按行查看 历史
xvdongming 提交于 2019-08-25 10:56 . first commit files
/**********************************************************************************
功能: 系统注册密码输入对话框中四个编辑框事件过滤功能。实现一下功能:
1、控制每一个编辑框只能输入6个字符
2、当前编辑框输入字符为6个时,自动发送跳转至下一个编辑框的槽信号,通知对话框切换输入焦点控件
建立:xvdongming
日期:2019-08-25
**********************************************************************************/
#ifndef TEVENTFILTER1_H
#define TEVENTFILTER1_H
#include <QObject>
#include <QEvent>
class TPassWordInputEventFilter : public QObject
{
Q_OBJECT
public:
explicit TPassWordInputEventFilter(QObject *parent = 0);
signals:
void FouseNextControl(QObject *currentObj);
public slots:
public:
bool eventFilter(QObject *obj, QEvent *event);
private:
void PasswordInputFilter(QObject *obj);
bool IsInputLetterAndNumber(QEvent *event);
int GetTextEditTextLength(QObject *obj);
};
#endif // TEVENTFILTER1_H
C++
1
https://gitee.com/xvdongming/PassWordInputFilter.git
git@gitee.com:xvdongming/PassWordInputFilter.git
xvdongming
PassWordInputFilter
PassWordInputFilter
master

搜索帮助