QT 控件添加鼠标右键事件

给需要处理事件的控件添加事件过滤器

在构造函数内 添加事件过滤器

	ui->控件->installEventFilter(this);	//添加事件过滤器

重写eventFilter(QObject *watched, QEvent *event)函数


//重写函数
bool</

猜你喜欢

转载自blog.csdn.net/qq_45646951/article/details/111247512
今日推荐