• 5576阅读
  • 4回复

[讨论]Phonon框架的视频播放器进入全屏模式后如何捕获鼠标事件? [复制链接]

上一主题 下一主题
离线bboyfeiyu
 

只看楼主 倒序阅读 楼主  发表于: 2011-10-06
关键词: phonon播放器
Phonon框架的视频播放进入全屏模式后如何捕获鼠标事件?我是想进入全屏的时候点击右键会出现菜单,比如退出全屏等,文档给出的说明如下:




fullScreen : bool


This property holds whether the video is shown using the complete screen.
The property differs from QWidget::fullScreen in that it is writeable.
By default the widget is not shown in fullScreen.
Warning: When switching to full screen mode using setFullScreen(), the widget onto which the video is rendered is shown as a top-level window. Key event forwarding is handled by VideoWidget, but if you need to handle other events, e.g., mouse events, you should handle fullscreen mode yourself.
Access functions:
boolisFullScreen () const
voidsetFullScreen ( bool fullscreen )

理解的朋友请给出解决方法,不甚感激。
离线wxj120bw

只看该作者 1楼 发表于: 2011-10-06
回 楼主(bboyfeiyu) 的帖子
我的理解 鼠标事件是由上一级窗口来处理
离线bboyfeiyu

只看该作者 2楼 发表于: 2011-10-07
回 1楼(wxj120bw) 的帖子
交给父窗口处理是吗 ? 我的是基于QWidget的类,videoWidget是属于一个子窗口罢了。我用QAction的方法实现了退出全屏的,只是想知道用事件的方法如何去实现。非常感谢你的回答
离线wxj120bw

只看该作者 3楼 发表于: 2011-10-07
回 2楼(bboyfeiyu) 的帖子
由videoWidget所属的类来处理
离线bboyfeiyu

只看该作者 4楼 发表于: 2011-10-07
回 3楼(wxj120bw) 的帖子
我用eventFilter解决了,谢谢你的回复。
快速回复
限100 字节
 
上一个 下一个