QT control adds the right mouse button event

Add event filters to controls that need to handle events

Add event filter inside the constructor

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

Rewrite eventFilter(QObject *watched, QEvent *event) function


//重写函数
bool</

Guess you like

Origin blog.csdn.net/qq_45646951/article/details/111247512