QOpenGLWidget 全屏显示黑屏解决方案

本文探讨了使用QOpenGLWidget在Qt中处理YUV视频时全屏下黑屏的问题,并分享了Qt官方的解决方案,通过设置QWindowsWindowFunctions以解决OpenGL全屏模式下窗口层级问题。

承接Qt/C++软件开发项目,高质量交付,灵活沟通,长期维护支持。需求所寻,技术正适,共创完美,欢迎私信联系!

一、碰到的问题:

用 QOpenGLWidget 显示YUV数据视频时,部分电脑设置全屏时会黑屏。

二、 Qt 给出的方案

Fullscreen OpenGL Based Windows

When a window is using an OpenGL based surface and is appearing in full screen mode, problems can occur with other top-level windows which are part of the application. Due to limitations of the Windows DWM, compositing is not handled correctly for OpenGL based windows when going into full screen mode. As a result, other top-level windows are not placed on top of the full screen window when they are made visible. For example, menus may not appear correctly, or dialogs fail to show up.

A window can use an OpenGL based surface either explicitly when 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值