摘要: 1、事件过滤器用于拦截传递到目标对象的事件,这样可以实现监视目标对象事件的作用 2、Qt 实现事件过滤器的步骤如下: ①、Qt 调用void QObject::installEventFilter (QObject* filterObj),给filterObj 对象设置安装(或注册)事件过滤器,fi 阅读全文
posted @ 2020-09-22 21:14 天子骄龙 阅读(1105) 评论(0) 推荐(0)
摘要: enent事件是通过返回true或false,来决定是否传递事件,不能通过接受accept()或忽略ignore() c.h文件 #ifndef C_H #define C_H #include <QPushButton> #include <QEvent> #include <QDebug> cl 阅读全文
posted @ 2020-09-22 09:34 天子骄龙 阅读(755) 评论(0) 推荐(0)