Qt 鼠标穿透方法 多层(透明)窗口 上层窗口鼠标消息传递给下层窗口

鼠标穿透参考方法:

1. QWidget::setMask(QRegion(childrenRegion()));

2. setAttribute(Qt::WA_TransparentForMouseEvents,true); //设置该属性窗口的子控件不能再响应鼠标消息

3. 透明popup window窗口

setWindowFlags(Qt::FramelessWindowHint | Qt::Tool);

setAttribute(Qt::WA_TranslucentBackground,true);

对于 动画子控件,不知如何响应鼠标穿透消息?

猜你喜欢

转载自blog.csdn.net/smartgps2008/article/details/91626181